refactor: Store cached files in tmp directory so OS will clear file cache from time to time

This commit is contained in:
Krille 2023-02-14 17:19:28 +01:00
parent dfc933115f
commit 1cbfb592e9

View File

@ -113,7 +113,7 @@ class FlutterHiveCollectionsDatabase extends HiveCollectionsDatabase {
Future<String> _getFileStoreDirectory() async {
try {
try {
return (await getApplicationSupportDirectory()).path;
return (await getTemporaryDirectory()).path;
} catch (_) {
return (await getApplicationDocumentsDirectory()).path;
}