PromiseCacheX

JSON →
library 2.0.0 ·javascript
verified Jun 7, 2026

A lightweight promise-based caching library for JavaScript and TypeScript (v2.0.0, actively maintained). It caches asynchronous promises and synchronous values, eliminating redundant requests and preventing race conditions. Features include TTL expiry, LRU eviction for bounded caches, automatic cleanup of expired entries, and pending promise protection (unresolved promises are never evicted). Differentiators: promise-aware (stores pending promises), supports both async and sync values, bounded cache with LRU, and TypeScript-first with built-in types. Released monthly on npm.