Baseflow / Baseflow/flutter_cache_manager

Stale period not working properly

Open
#452 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
809
Forks
510
Avg merge
6m
Merged PRs (30d)
1

Description

` Im using **flutter_cache_manager: ^3.3.1** and the stale period its not working properly. its not automatically deleting the files.

final cacheManager = CacheManager(
Config(
id,
stalePeriod: Duration(seconds: 60),
maxNrOfCacheObjects: 10,
),
);

try {
final fileStream = cacheManager.getFileStream(_syncMusicUrl);

await for (var response in fileStream) {
if (response is FileInfo) {
_cacheMusicPath = response.file.path;

return true;
} else if (response is DownloadProgress) {}
}
return false;
} catch (error) {
syncSituation.value = "sync";
update();
return false;
} }`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.