lru-cache-idb

JSON →
library 0.5.2 ·javascript
verified Jun 7, 2026

lru-cache-idb v0.5.2 is an LRU cache for web applications backed by IndexedDB. It batches writes to reduce I/O (default write interval 15s), batches eviction (default 1 min), and optionally keeps a subset of items in memory for faster reads. Designed for multi-tab safety and cross-session persistence, it implements a modern LRU eviction policy. Unlike most LRU caches (e.g., lru-cache for Node), lru-cache-idb is browser-first, uses no third-party dependencies, and is fully typed in TypeScript as an ESM-only module. Developed with low-frequency updates, it is stable for use cases requiring persistent client-side cache.