Cache: {
enabled: boolean;
items: Record<
string,
{ files: Record<string, HTMLImageElement | Blob>; lastAccess: number },
>;
maxItems: number;
purgeInterval: number;
ttl: number;
add(url: string, key: string, data: HTMLImageElement | Blob): void;
get(url: string, key: string): HTMLImageElement | Blob;
init(): void;
purge(): void;
remove(url: string, key: string): void;
} = ...
Type Declaration
-
enabled: boolean
-
items: Record<
string,
{ files: Record<string, HTMLImageElement | Blob>; lastAccess: number },
>
-
maxItems: number
-
purgeInterval: number
-
ttl: number
-
add: function
-
add(url: string, key: string, data: HTMLImageElement | Blob): void
Parameters
- url: string
- key: string
- data: HTMLImageElement | Blob
Returns void
-
get: function
-
get(url: string, key: string): HTMLImageElement | Blob
Returns HTMLImageElement | Blob
-
init: function
-
purge: function
-
remove: function
-
remove(url: string, key: string): void