Baseflow / Baseflow/flutter_cache_manager
Exception after clearing cache, the code tries to delete not existing image file
- Lenguaje dominante
- Dart
- Estrellas
- 809
- Forks
- 510
- Merge medio
- 6 min
- PR fusionados (30 d)
- 1
Descripción
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?
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- dart, flutter
- Área
- mobile-dev
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 52/100