node-ts-cache-storage-node-fs
Version: 
Nodejs filesystem storage module for node-ts-cache
12 lines (11 loc) • 400 B
TypeScript
import { ICacheItem, IStorage } from "node-ts-cache";
export declare class NodeFsStorage implements IStorage {
    jsonFilePath: string;
    constructor(jsonFilePath: string);
    getItem(key: string): Promise<ICacheItem | undefined>;
    setItem(key: string, content: any): Promise<void>;
    clear(): Promise<void>;
    private createEmptyCache;
    private setCache;
    private getCacheObject;
}