express-route-cache
Version:
Route caching for Express
11 lines (10 loc) • 373 B
TypeScript
import { ICache } from "./icache";
export declare class InMemoryCache implements ICache {
private _cache;
get<T>(key: string): Promise<T | undefined>;
set<T>(key: string, value: T, ttlSeconds: number): Promise<boolean>;
has(key: string): Promise<boolean>;
del(key: string): Promise<boolean>;
flush(): Promise<void>;
keys(): Promise<string[]>;
}