aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Data/AniList/cacheHydration.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Data/AniList/cacheHydration.ts')
-rw-r--r--src/lib/Data/AniList/cacheHydration.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Data/AniList/cacheHydration.ts b/src/lib/Data/AniList/cacheHydration.ts
index 434d2a82..ac3b4d72 100644
--- a/src/lib/Data/AniList/cacheHydration.ts
+++ b/src/lib/Data/AniList/cacheHydration.ts
@@ -6,6 +6,8 @@ import localforage from "localforage";
type MediaCacheKind = "anime" | "manga";
+const cacheStorageKey = (kind: MediaCacheKind) => `${kind}:v2`;
+
interface StoredLastPruneTimes {
anime: number;
chapters: number;
@@ -32,7 +34,7 @@ export const hydrateMediaListCache = (kind: MediaCacheKind) => {
const promise = (async () => {
const [cache, pruneTimes] = await Promise.all([
- localforage.getItem<string>(kind),
+ localforage.getItem<string>(cacheStorageKey(kind)),
localforage.getItem<StoredLastPruneTimes>("lastPruneTimes"),
]);