Baseflow / Baseflow/flutter_cache_manager

Exception after clearing cache, the code tries to delete not existing image file

未关闭
#433 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Dart
星标
809
派生
510
平均合并
6 分钟
30 天内合并 PR
1

描述

After executing

await DefaultCacheManager().emptyCache();

to clear cache, and immediately refresh images, I get exceptions in the library code trying to delete non existing files.

**I have noticed 3 missing awaits when calling _removeCachedFile in cache_store.dart. Adding the 3 missing awaits solves the issue for me...**

I think missing awaits calling _removeCachedFile produces internal awaits not waiting code execution, and that's the reason exceptions trying to delete non existing files, even if the code checked that the file exists.

Can anybody add the missing awaits in the code please?

贡献指南

打开贡献指南

调研方向

检查 cache_store.dart,并找到 issue 中所述的三处 _removeCachedFile 调用。首先跟踪清除缓存和刷新图像的流程,然后通过清除缓存并立即刷新图像来验证行为。报告的异常不再发生即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart, flutter
领域
mobile-dev
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。