import { SQLiteCache } from './SQLiteCache';

export const DAY_MS = 86_400_000; // 1 day
export const MIN_MS = 60_000; // 1 min
export const QUARTER_HOUR_MS = 900_000; // 15 min
export const HOUR_MS = 3_600_000; // 1 hour

export const YEAR_MS = 31_536_000_000; // 1 year

/** General-purpose cache for data that rarely changes (publications, sponsors, books, cover art). */
export const cache = new SQLiteCache({ path: './cache.db', ttl: DAY_MS });

// /** Short-lived cache for "now playing", which changes often. */
// export const liveCache = new SQLiteCache({ path: './cache-live.db', ttl: MIN_MS });

// /** Medium-lived cache for the history pages (recent plays, finished books). */
// export const historyCache = new SQLiteCache({ path: './cache-history.db', ttl: QUARTER_HOUR_MS });
