Baseflow / Baseflow/flutter_cache_manager
removeFile don't remove line into database
- Vorherrschende Sprache
- Dart
- Sterne
- 809
- Forks
- 510
- Ø Merge
- 6 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
## 🐛 Bug Report
When i call the `removeFile()` i see that the cached file is deleted into `/data/user/0/fr.serialtrip/cache/libCachedImageData`
But not into the database **libCachedImageData.db**
When I see the code, i don't understand. Is it a bug ?
> Future removeCachedFile(CacheObject cacheObject) async {
final provider = await _cacheInfoRepository;
final toRemove = [];
unawaited(_removeCachedFile(cacheObject, toRemove));
await provider.deleteAll(toRemove);
}
With this code `unawaited(_removeCachedFile(cacheObject, toRemove));` it's impossible to delete the IDs from database (SQLite in my case) because it's not an await. So the toRemove is empty on the next line.
### Configuration
**Version:** 2.1.1
**Platform:**
- [x] :robot: Android
Beitragsleitfaden
Rechercherichtung
Start at removeCachedFile(CacheObject cacheObject) and trace _removeCachedFile to see when IDs are added to toRemove. Verify the database deletion occurs after that asynchronous work completes, then reproduce the Android cache-removal case and confirm both the cached file and its database row are removed.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- dart, flutter, sqlite
- Bereich
- database, mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100