Baseflow / flutter_cache_manager

Generic cache manager for flutter
https://baseflow.com
MIT License
740 stars 429 forks source link

Cache eviction #261

Open esiqveland opened 3 years ago

esiqveland commented 3 years ago

Hi, thank you for a great project simplifying persistent caching in flutter!

🚀 Feature Requests

Eviction based on cache size. It seems the only policy available is number of objects and age.

Contextualize the feature

I only store immutable objects. No object can ever change. It therefore does not make sense to me to evict objects based on age. I wish that the user can set a maximum allowed storage capacity for the cache, such as 250MB and then fill this up, never evicting until the cache is full. Never evicting could also be important to make offline mode work smoother, though I realize offline support might be outside the scope of this project.

Describe the feature

Platforms affected (mark all that apply)