typescript-lru-cache

JSON →
library 2.0.0 ·javascript
verified Jun 7, 2026

A TypeScript-native LRU cache implementation with no runtime dependencies. Current stable version is 2.0.0. Uses a Map for internal storage, supporting any key type including reference types. Provides optional clone functionality, per-entry TTL, and eviction callbacks. Unlike other LRU caches (e.g., lru-cache), this package ships TypeScript source code and type definitions, and has a smaller API surface focusing on simplicity.