feat: implement DELETE API endpoint for cache invalidation in HomeService and update ClientHomePage to utilize it
This commit is contained in:
@@ -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
20
src/types/debug.ts
Normal 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
10
src/types/home.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { KomgaBook, KomgaSeries } from "./komga";
|
||||
|
||||
export interface HomeData {
|
||||
ongoing: KomgaSeries[];
|
||||
ongoingBooks: KomgaBook[];
|
||||
recentlyRead: KomgaBook[];
|
||||
onDeck: KomgaBook[];
|
||||
latestSeries: KomgaSeries[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user