Baseflow / Baseflow/flutter_cache_manager

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

Đang mở
#433 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
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ả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Inspect cache_store.dart and locate the three calls to _removeCachedFile described in the issue. Start by tracing the cache-clearing and image-refresh flow, then verify the behavior by clearing the cache and immediately refreshing images. Done means the reported exceptions no longer occur.

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-dev
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.