Baseflow / Baseflow/flutter_cache_manager

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

Offen
#433 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Dart
Sterne
809
Forks
510
Ø Merge
6 Min.
Gemergte PRs (30 T.)
1

Beschreibung

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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart, flutter
Bereich
mobile-dev
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.