1 | import { CacheInterface, keyInterface, cacheListener } from './types';
|
2 | export default class Cache implements CacheInterface {
|
3 | private __cache;
|
4 | private __listeners;
|
5 | constructor(initialData?: any);
|
6 | get(key: keyInterface): any;
|
7 | set(key: keyInterface, value: any, shouldNotify?: boolean): any;
|
8 | keys(): string[];
|
9 | has(key: keyInterface): boolean;
|
10 | clear(shouldNotify?: boolean): void;
|
11 | delete(key: keyInterface, shouldNotify?: boolean): void;
|
12 | serializeKey(key: keyInterface): [string, any, string];
|
13 | subscribe(listener: cacheListener): () => void;
|
14 | private notify;
|
15 | }
|