feat: implement DELETE API endpoint for cache invalidation in HomeService and update ClientHomePage to utilize it

This commit is contained in:
Julien Froidefond
2025-10-17 10:12:50 +02:00
parent fea04e4d10
commit 946b495ce2
14 changed files with 91 additions and 81 deletions

View File

@@ -1,8 +1 @@
export interface TTLConfig {
defaultTTL: number;
homeTTL: number;
librariesTTL: number;
seriesTTL: number;
booksTTL: number;
imagesTTL: number;
}
export type CacheType = "DEFAULT" | "HOME" | "LIBRARIES" | "SERIES" | "BOOKS" | "IMAGES";

20
src/types/debug.ts Normal file
View File

@@ -0,0 +1,20 @@
import type { CacheType } from "./cache";
export interface RequestTiming {
url: string;
startTime: number;
endTime: number;
duration: number;
timestamp: string;
fromCache: boolean;
cacheType?: CacheType;
mongoAccess?: {
operation: string;
duration: number;
};
pageRender?: {
page: string;
duration: number;
};
}

10
src/types/home.ts Normal file
View File

@@ -0,0 +1,10 @@
import type { KomgaBook, KomgaSeries } from "./komga";
export interface HomeData {
ongoing: KomgaSeries[];
ongoingBooks: KomgaBook[];
recentlyRead: KomgaBook[];
onDeck: KomgaBook[];
latestSeries: KomgaSeries[];
}