Cleaning cache, but save some chunks

I'm using cache remote and I have a possible feature.

Would there be any way that at the time of cleaning the cache delete all the chunks except the first chunk of each file? (if is set 16M size, the first 16M of each file) and these first peces are "not considered" of cache limit size to avoid them be deleted.

That way, any time you want to load a file, it starts inmediatly and have enough time to continue downloading next chunks.

Maybe some kind of Flag like --preserve-first or Something like that.

You could always make a feature request on github for that. There is no cache backend maintained at the moment so not sure how much movement it would get.

Not sure the use case for the feature to as having to store the first part of a file seems odd and tough to maintain as you'd have to maintain a file list and that's overhead as well too.

What's the actual problem / use case you are trying to solve as you have a solution, but not sure why you'd want to do that.

i sincerely hope this isn't the case for too long. cache outperforms vfs for me by leaps and bounds

VFS and cache are two overlapping concepts. I'm planning (currently working on) merging the cache layer with the VFS layer so you can use --vfs-cache-mode full and it will work pretty much like the cache does. Not there yet though!

3 Likes

this is literally the best and most important thing said on this forum yet. This should be an announcement.

2 Likes

This would be a great feature! +1

Oh yeah! This would be great! Thanks for thinking about it.