UNPKG

runtime-memory-cache

Version:

A lightweight, high-performance in-memory cache for Node.js with TTL support, configurable eviction policies (FIFO/LRU), statistics tracking, and zero dependencies.

15 lines (14 loc) 348 B
import { CacheStats } from './types'; /** * Statistics tracker for cache operations */ export declare class StatsTracker { private stats; constructor(maxSize: number); recordHit(): void; recordMiss(): void; recordEviction(): void; updateSize(size: number): void; getStats(): Readonly<CacheStats>; reset(): void; }