1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export interface Cache {
|
7 | load(cacheId: string, cacheDir?: string): void;
|
8 | loadFile(pathToFile: string): void;
|
9 | all(): { [key: string]: any };
|
10 | keys(): string[];
|
11 | setKey(key: string, value: any): void;
|
12 | removeKey(key: string): void;
|
13 | getKey(key: string): any;
|
14 | save(noPrune?: boolean): void;
|
15 | removeCacheFile(): boolean;
|
16 | destroy(): void;
|
17 | }
|
18 |
|
19 | export function load(cacheId: string, cacheDir?: string): Cache;
|
20 |
|
21 | export function create(cacheId: string, cacheDir?: string): Cache;
|
22 |
|
23 | export function createFromFile(filePath: string): Cache;
|
24 |
|
25 | export function clearCacheById(cacheId: string, cacheDir?: string): boolean;
|
26 |
|
27 | export function clearAll(cacheDir?: string): boolean;
|