Baseflow / Baseflow/flutter_cache_manager

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

Ouverte
#433 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
Dart
Étoiles
809
Forks
510
Merge moyen
6 min
PR mergées (30 j)
1

Description

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?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
dart, flutter
Domaine
mobile-dev
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.