Baseflow / Baseflow/flutter_cache_manager
Stale period not working properly
- 主要语言
- Dart
- 星标
- 809
- 派生
- 510
- 平均合并
- 6 分钟
- 30 天内合并 PR
- 1
描述
` 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;
} }`
贡献指南
调研方向
首先按照 issue 中所示,使用 flutter_cache_manager 3.3.1、60 秒的 stalePeriod 和 getFileStream 重现报告。根据这种用法跟踪缓存清理行为,并验证缓存文件是否会在配置的 stalePeriod 之后被移除。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart, flutter
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100