typescript-cacheable
Version:
An in-memory caching (memoization) decorator for Typescript
13 lines (12 loc) • 639 B
TypeScript
import { CacheableOptions } from '../CacheableOptions';
import { CacheRegistry, Cache, MethodMap } from './CacheRegistry';
export declare class LocalStorageCacheRegistry extends CacheRegistry {
private getStoreFunction;
getOrInitCache(target: unknown, methodName?: string): Cache;
protected getCacheHost(target: unknown, methodName?: string): unknown;
protected newCache(): Map<string, MethodMap>;
protected processOptions(target: unknown, methodName: string, options?: CacheableOptions): void;
initCache(cacheHost?: unknown): void;
initialiseStore(storeFunction: () => unknown): void;
private getTarget;
}