Baseflow / Baseflow/flutter_cache_manager
Stale period not working properly
- Ngôn ngữ chính
- Dart
- Star
- 809
- Fork
- 510
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
` 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;
} }`
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện báo cáo với flutter_cache_manager 3.3.1, stalePeriod 60 giây và getFileStream như được minh họa trong issue. Theo dõi hành vi dọn dẹp cache từ cách sử dụng này và xác minh rằng các tệp được cache bị xóa sau stalePeriod đã cấu hình.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- dart, flutter
- Lĩnh vực
- mobile
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100