@effectai/sdk
Version:
Effect Network Javscript/Typescript SDK (for [https://effect.network](https://effect.network))
28 lines (27 loc) • 852 B
TypeScript
export declare const memoryCache: Map<any, any>;
export interface Cache {
get(key: string): unknown;
set(key: string, value: unknown): void;
}
export declare class MemoryCache implements Cache {
size(): number;
get(key: string): unknown;
set(key: string, value: unknown): void;
}
export declare class LocalStorageCache implements Cache {
localStorage: Storage;
constructor();
get(key: string): unknown;
set(key: string, value: unknown): void;
}
export declare class IDBCache implements Cache {
get(key: string): Promise<unknown>;
set(key: string, value: unknown): void;
}
export declare class CacheManager {
private cache;
constructor(cache: Cache);
get(key: string): unknown;
set(key: string, value: unknown): void;
}
export declare const createCacheManager: (cache: Cache) => CacheManager;