/** Count-Min Sketch with periodic aging (TinyLFU frequency estimator). */ export declare class CountMinSketch { #private; readonly depth: number; readonly width: number; private readonly rows; private adds; private readonly ageAfter; constructor(width?: number, depth?: number, ageAfter?: number); hit(key: string): number; estimate(key: string): number; } /** * Window-TinyLFU admission + LRU main cache (Caffeine-style). * Values live in the caller; this tracks keys, frequency and eviction order. */ export declare class WTinyLfu { #private; readonly capacity: number; readonly windowSize: number; readonly sketch: CountMinSketch; /** Optional access log for later cache-policy replay. */ readonly trace: Array<{ op: "hit" | "add" | "evict"; key: string; }> | null; private readonly window; private readonly main; constructor(capacity: number, options?: { trace?: boolean; windowRatio?: number; }); get size(): number; has(key: string): boolean; hit(key: string): void; /** Insert `key`. Returns a victim key when the cache is full. */ add(key: string): string | undefined; delete(key: string): boolean; /** Evict the least valuable unpinned key. */ evictExcept(pinned: ReadonlySet): string | undefined; } export declare function wTinyLfu(capacity: number, options?: { trace?: boolean; windowRatio?: number; }): WTinyLfu; //# sourceMappingURL=tiny-lfu.d.ts.map