cache-ttl
Version:
The key-value storage with TTL support, allowing you to add, modify or delete stored data items.
13 lines (12 loc) • 365 B
TypeScript
import Time from './time';
declare class Cache extends Time {
private static cache;
private constructor();
static readonly count: number;
static get<T>(key: string): T;
static set(key: string, value: any, ttl?: number): void;
static remove(key: string): void;
static clear(): void;
static toString(): string;
}
export default Cache;