In-memory Cache for Node.js

JSON →
library 5.1.2 ·javascript
verified May 27, 2026

node-cache is a simple, fast, and internal in-memory caching module for Node.js applications, designed to function similarly to memcached but within a single Node.js process. It supports setting key-value pairs with optional time-to-live (TTL) expiration, allowing for automatic invalidation and deletion of stale data. The current stable version is 5.1.2, actively maintained with regular updates addressing bug fixes and minor features, as evidenced by recent 5.x releases. A major breaking change in v5.0.0 removed callback support, shifting entirely to synchronous operations (with an opt-in legacy callback option for migration), and dropped the `lodash` dependency, improving performance and reducing the bundle size. It differentiates itself by its straightforward API and focus on local process caching, suitable for scenarios where a full-fledged external caching solution like Redis or Memcached is overkill. Keys can be strings or numbers, and the cache can be configured with standard TTLs, periodic cleanup, and an option to store references vs. clones of values, balancing performance and data isolation.

total hits 13
actors 8 distinct systems
last hit 7d ago ChatGPT-User
GPTBot
2
Script
1
ClaudeBot
1
ChatGPT-User
1
Search engines
3

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇧🇷 Brazil · 🇩🇪 Germany