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

Research direction

Start by reproducing the report with flutter_cache_manager 3.3.1, a 60-second stalePeriod, and getFileStream as shown in the issue. Trace the cache cleanup behavior from this usage and verify that cached files are removed after the configured stale period.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.