node-ts-cache
Version:
Simple and extensible caching module supporting decorators
12 lines (11 loc) • 415 B
TypeScript
import { IStorage } from "../storage";
import { ICachingOptions } from "./cache-container-types";
export declare class CacheContainer {
private storage;
constructor(storage: IStorage);
getItem<T>(key: string): Promise<T | undefined>;
setItem(key: string, content: any, options: Partial<ICachingOptions>): Promise<void>;
clear(): Promise<void>;
private isItemExpired;
private unsetKey;
}