Expire Cache Based on Size Instead of Age

I’d like to request a flag to manage rclone’s cache based on size rather than age.

I have a 20TB cache datastore. Like RAM, empty cache is wasted cache. If it can be assumed that the remote is never updated without rclone being aware of it, there’s no reason to expire cached chunks if there’s enough space to keep it. Instead, it would be ideal if the oldest chunks would be cleared out once the cache exceeds a configured size.

I imagine the greatest amount of flexibility would be to allow rclone to expire cache based on either criteria. A max age and a max size would both be configured, and chunks would be deleted if either threshold is exceeded.

Like many others here, I’m an avid user of rclone and it has changed how I utilize my cloud services substantially, so I also wanted to thank you.

That seems like a reasonable idea. Can you check there isn’t an issue about that aready and if not please make a new issue on github.