folder restructuring

This commit is contained in:
2026-05-05 21:44:23 +02:00
parent db9c3386f1
commit 4f796dac2e
102 changed files with 1254 additions and 879 deletions
+15
View File
@@ -0,0 +1,15 @@
import 'package:localstore/localstore.dart';
import '../api/requestCache.dart';
class DataCleaner {
static Future<void> cleanOldCache() async {
var cacheData = await Localstore.instance.collection(RequestCache.collection).get();
cacheData?.forEach((key, value) async {
var lastUpdate = DateTime.fromMillisecondsSinceEpoch(value['lastupdate']);
if(DateTime.now().subtract(const Duration(days: 200)).isAfter(lastUpdate)) {
await Localstore.instance.collection(RequestCache.collection).doc(key.split('/').last).delete();
}
});
}
}