chore: update cache retention

This commit is contained in:
Pearoo
2025-09-13 20:13:09 +02:00
committed by Armand
parent c36d656178
commit f04517749b

View File

@@ -455,12 +455,12 @@ class KretaClient {
}
}
// only cache stuff 4 months ago and a week in advance
// only cache stuff 4 months ago and a month in advance
if (from.millisecondsSinceEpoch >=
now.subtract(Duration(days: 120)).millisecondsSinceEpoch) {
if (to == null ||
to.millisecondsSinceEpoch <=
now.add(Duration(days: 7)).millisecondsSinceEpoch) {
now.add(Duration(days: 31)).millisecondsSinceEpoch) {
await isar.writeTxn(() async {
await storeCache(resp, cacheKey);
});