Hi, with my particular use case of rclone with VFS i'd prefer it to cache small files for as long as possible, and larger files I'd only need for a minimal amount of time.
As far as I can tell from playing with the settings, and reading all the VFS parameters this option isn't quite possible yet. If it is can someone let me know, if not then can it be a feature please.
I've tried messing around with Cloudflare (introduces intermittent problems with Chromecast), and Nginx caching (Introduces problems where certain videos will cache corrupted and refuse to play).
Using with Emby, I keep all my movie posters and other accessory files in the same folder as the media file (because keeping them local takes up too much space, makes migrating take way too long, and is easier to manage directly) eg:
[gdrive storage]
Movie folder/poster.jpg
Movie folder/Movie.mp4
This of course all gets cached into the VFS when it's needed. First load takes a second while it pulls from gdrive into the local file system obviously. Loading the home page that's nothing but poster files with empty cache takes forever.
But then the next time it needs that poster, it's already there in the VFS. Great. Also useful for having that movie file there so rewinding or exiting and reopening on another device is speedy.
However currently when the local storage fills up, the VFS purges the oldest files first. Not a concern for big movie files, it's unlikely to be needed again by any user in the near future. But the poster files that get loaded regularly for the home page and browsing I would really like to stay more or less indefinitely (until they inevitably fill up storage themselves).
Long story short; can there be a parameter like:
-vfs-cache-purge-priority [ age | size | access ] When cache storage fills, delete [age] oldest files first, [size] biggest files first, [access] least recently used first.