UNPKG

xpm

Version:

The xPack project manager command line tool

15 lines (14 loc) 391 B
import { Cache } from './cache'; export declare class LRU<T> implements Cache<T> { limit: number; size: number; private cache; private head; private tail; constructor(limit: number, size?: number); write(key: string, value: T): void; read(key: string): T | undefined; remove(key: string): void; clear(): void; private ensureLimit; }