lru-ttl-cache

JSON →
library 2.4.8 ·javascript
verified Jun 7, 2026

Fast LRU (Least Recently Used) and TTL (Time-To-Live) cache implementation with upsert and promise support. Current stable version is 2.4.8, actively maintained. Key differentiators: supports both LRU eviction and TTL expiration simultaneously, built-in upsert (insert or update) operations, and promise-based async value resolution. Lightweight, zero dependencies, TypeScript type definitions included. Suitable for in-memory caching in Node.js and browser environments where both access pattern and expiration control are needed.