perf: Event-Cache von ±8 Wochen auf ±10 Monate erweitern

Damit lädt beim Swipen durch Monate erst nach ~10 Monaten in beide
Richtungen erneut Daten nach. Vorher reichte der Cache nur ±2 Monate,
sodass nach 2-3 Wischen ein Spinner kam.

- CACHE_BUF      56  → 300 Tage (initial ±10 Monate)
- PREFETCH_EXT   56  → 180 Tage (Verlängerung bei Edge ~6 Monate)
- PREFETCH_EDGE  28  →  90 Tage (Trigger ~3 Monate vor Cache-Rand)

Version v6 → v7.
This commit is contained in:
Scarriffle
2026-05-07 19:23:35 +02:00
parent b9691ea209
commit 7cabfb10de
4 changed files with 16 additions and 16 deletions

View File

@@ -106,9 +106,9 @@ function handleHAOAuthReturn() {
}
// ── Event cache ───────────────────────────────────────────
const CACHE_BUF = 56 * 86400000; // initial ±8 weeks
const PREFETCH_EXT = 56 * 86400000; // extend by 8 weeks when triggered
const PREFETCH_EDGE = 28 * 86400000; // trigger when within 4 weeks of cache edge
const CACHE_BUF = 300 * 86400000; // initial ±10 months around the view
const PREFETCH_EXT = 180 * 86400000; // extend by ~6 months when triggered
const PREFETCH_EDGE = 90 * 86400000; // trigger when within ~3 months of cache edge
const eventCache = {
start: null, end: null, events: [],

View File

@@ -1,2 +1,2 @@
// Increment APP_VERSION with every code change
export const APP_VERSION = 'v6';
export const APP_VERSION = 'v7';