You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reduce cache size / clear up to a certain weight #84
I'm currently using this as the backing for a disk cache, and sometimes I want to clear out x number of bytes. I'm already using custom weighter and lifecycle, my question is, is there way to say "clear out xx weight units".
I think I could use retain for this, but I'm not sure what order the entries are returned in, if it returns the entries in the order that they would be evicted in that would be perfect, even if it was eviction reverse order it would be fine too.
Activity
[-]Clear up to a certain weight[/-][+]Reduce cache size / clear up to a certain weight[/+]arthurprs commentedon Oct 6, 2025
Released as part of 0.6.17