1 | import { ICache } from "./icache";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export declare class RollingCache<DataType> implements ICache<DataType> {
|
7 | private cacheRoot;
|
8 | private checkNewCache;
|
9 | private oldCacheRoot;
|
10 | private newCacheRoot;
|
11 | private rolled;
|
12 | |
13 |
|
14 |
|
15 |
|
16 | constructor(cacheRoot: string, checkNewCache: boolean);
|
17 | /**
|
18 | * @returns true if name exist in old cache (or either old of new cache if checkNewCache is true)
|
19 | */
|
20 | exists(name: string): boolean;
|
21 | path(name: string): string;
|
22 | /**
|
23 | * @returns true if old cache contains all names and nothing more
|
24 | */
|
25 | match(names: string[]): boolean;
|
26 | /**
|
27 | * @returns data for name, must exist in old cache (or either old of new cache if checkNewCache is true)
|
28 | */
|
29 | read(name: string): DataType | null | undefined;
|
30 | write(name: string, data: DataType): void;
|
31 | touch(name: string): void;
|
32 | /**
|
33 | * clears old cache and moves new in its place
|
34 | */
|
35 | roll(): void;
|
36 | }
|
37 | //# sourceMappingURL=rollingcache.d.ts.map |
\ | No newline at end of file |