fix: cache file KO if reload

This commit is contained in:
Julien Froidefond
2025-02-23 16:03:07 +01:00
parent 442f318be8
commit 54d8a0684c
12 changed files with 210 additions and 183 deletions

View File

@@ -1,7 +1,7 @@
import { BaseApiService } from "./base-api.service";
import { KomgaBook, KomgaSeries } from "@/types/komga";
import { LibraryResponse } from "@/types/library";
import { serverCacheService } from "./server-cache.service";
import { getServerCacheService } from "./server-cache.service";
interface HomeData {
ongoing: KomgaSeries[];
@@ -67,9 +67,10 @@ export class HomeService extends BaseApiService {
}
}
static async clearHomeCache() {
serverCacheService.delete("home-ongoing");
serverCacheService.delete("home-recently-read");
serverCacheService.delete("home-on-deck");
static async invalidateHomeCache(): Promise<void> {
const cacheService = await getServerCacheService();
cacheService.delete("home-ongoing");
cacheService.delete("home-recently-read");
cacheService.delete("home-on-deck");
}
}