Baseflow / Baseflow/flutter_cache_manager
removeFile don't remove line into database
- 主要言語
- Dart
- スター
- 809
- フォーク
- 510
- 平均マージ
- 6分
- マージ済み PR(30日)
- 1
説明
## 🐛 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
コントリビューションガイド
調査の方向性
removeCachedFile(CacheObject cacheObject) から開始し、ID が toRemove に追加されるタイミングを確認するために _removeCachedFile を追跡します。その非同期処理が完了した後にデータベースの削除が行われることを確認し、次に Android でキャッシュ削除のケースを再現して、キャッシュされたファイルとそのデータベース行の両方が削除されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, flutter, sqlite
- 領域
- database, mobile
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100