@beenotung/tslib
Version:
utils library in Typescript
27 lines (26 loc) • 862 B
TypeScript
import { Store } from './store';
/**
* only cache object
* raw string item are not cached
* */
export declare class CachedObjectStore implements Store {
private [Symbol.objectCache];
private [Symbol.cacheSize];
private [Symbol.store];
private [Symbol.asyncStore];
private [Symbol.maxCacheSize];
private constructor();
get [Symbol.storage](): Storage;
set storage(storage: Storage);
get length(): number;
clear(): void;
clearCache(): void;
getItem(key: string): string | null;
getObject<T>(key: string): T | null;
key(index: number): string | null;
keys(): string[];
removeItem(key: string): void;
setItem(key: string, value: string): void;
setObject(key: string, value: any): void;
static create(dirpath: string, maxCacheSize?: number, maxStorageSize?: number): CachedObjectStore;
}