-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I tried to use all the Policies that you sugested in the documentation, but the files are only available for few seconds. Can you provide an example? I may forget something because the files are deleted when I tried to gets its content after almost 20 seconds.
class LastDownloadedCachePolicy extends CacheControlPolicy {
LastDownloadedCachePolicy({int maxCount = 999})
: super(
maxCount: maxCount,
minAge: Duration(days: 5),
maxAge: Duration(days: 30),
);
@override
String generateFilename({final String key, final String url}) => key;
}
var store = await CacheStore.getInstance(
policy: LastDownloadedCachePolicy(), fetch: _fetchFile);
final file = await store.getFile('https://avatars.githubusercontent.com/u/647070?s=460&u=b85f224c333f371142df249b17012c5f8fe66cf2&v=4', key: 'myFile')
using Android adb shell:
lroot@vbox86p:/data/data/com.example.myApp/cache/cache_store #
ls
root@vbox86p:/data/data/com.example.myApp/cache/cache_store #
All the cache was cleared.
BR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels