Baseflow / flutter_cache_manager

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

Delete file with wildcard #411

Closed KBIServiceAccount closed 1 year ago

KBIServiceAccount commented 1 year ago

🚀 Feature Requests

I'd like to delete files and use a wildcard in the url so that I can delete all the cached files related to a specific endpoint (but with different query params etc) but not have to empty the entire cache.

Contextualize the feature

in .removeFile(), it would be the easiest place to either integrate wildcards as is or make some smaller additions to be able to indicate you are intending to pass a url + wildcard.

Describe the feature

// url which has been saved in cache - "www.example.com/$id?param1=$foo&param2=$bar" final url = "www.example.com/$id"; myCache.instance.removeFile(url, findAllMatching=true) I'd like to be able to delete all cached files which contain a provided string (the url in .removeFile())

Platforms affected (mark all that apply)