1 | import { CacheConfig, CacheItem, CacheItemOptions } from './types';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export declare class StorageCache {
|
7 | protected cacheCurSizeKey: string;
|
8 | protected config: CacheConfig;
|
9 | |
10 |
|
11 |
|
12 |
|
13 | constructor(config: CacheConfig);
|
14 | getModuleName(): string;
|
15 | private checkConfig;
|
16 | /**
|
17 | * produce a JSON object with meta-data and data value
|
18 | * @param value - the value of the item
|
19 | * @param options - optional, the specified meta-data
|
20 | *
|
21 | * @return - the item which has the meta-data and the value
|
22 | */
|
23 | protected fillCacheItem(key: string, value: object | number | string | boolean, options: CacheItemOptions): CacheItem;
|
24 | /**
|
25 | * set cache with customized configuration
|
26 | * @param config - customized configuration
|
27 | *
|
28 | * @return - the current configuration
|
29 | */
|
30 | configure(config?: CacheConfig): CacheConfig;
|
31 | }
|