stale-lru-cache
JSON →stale-lru-cache is an in-memory LRU cache for Node.js that implements stale-while-revalidate strategy, allowing cached items to be served stale while being refreshed in the background. Version 5.1.1 is the latest stable release. It supports custom Cache-Control headers for HTTP caching, max age, max size, and configurable item sizing. Key differentiators: fault-tolerant background revalidation that hides refresh latency, shields from revalidation errors, and optimizes hit-ratio by discarding least recently used items first.
Resources
packagestale-lru-cache ↗