spin icon indicating copy to clipboard operation
spin copied to clipboard

Option to cache files from bindle

Open itowlson opened this issue 2 years ago • 4 comments

Fixes #455.

This feels pretty untidy in places. If anyone has thoughts on how it could be tidied, I'd really appreciate it!

I did wonder about sticking the cache option into the BindleConnectionInfo so it flowed without changing so many things, but I'm not sure that feels quite right...

itowlson avatar May 12 '22 23:05 itowlson

Have you seen bindle's (apparent) caching support? https://docs.rs/bindle/latest/bindle/cache/index.html

lann avatar May 13 '22 14:05 lann

@lann RED FACE HERE

I had not - thanks! That would certainly be a more desirable way to do this. I'll take a look when I've finished kicking myself.

itowlson avatar May 13 '22 23:05 itowlson

@lann I had a go with the Bindle cache module. Although it claims to be for both client and server side use, it currently seems to accept only server providers as sources. So, sadly, I think this is a non-starter for now.

itowlson avatar May 16 '22 21:05 itowlson

This feels pretty untidy in places. If anyone has thoughts on how it could be tidied, I'd really appreciate it!

How about a new BindleLoader struct with e.g. url, base_dst, cache_dir fields, refactoring some of these functions into methods?

lann avatar May 17 '22 15:05 lann