feat: clean cache on home

This commit is contained in:
Julien Froidefond
2025-02-22 15:44:43 +01:00
parent 448cdf6450
commit 66461ff32a
4 changed files with 29 additions and 3 deletions

View File

@@ -1,6 +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";
interface HomeData {
ongoing: KomgaSeries[];
@@ -63,4 +64,10 @@ export class HomeService extends BaseApiService {
return this.handleError(error, "Impossible de récupérer les données de la page d'accueil");
}
}
static async clearHomeCache() {
serverCacheService.delete("home-ongoing");
serverCacheService.delete("home-recently-read");
serverCacheService.delete("home-on-deck");
}
}