Fast, modern, and event-loop non-blocking memory cache for Node.js and browser. Version 1.4.0 is the current stable release, with regular updates. Uses JavaScript Map for faster lookups compared to plain object caches, and implements non-blocking cleanup for large caches (hundreds of thousands to millions of entries). Supports TypeScript with built-in types. Ideal for in-memory caching with configurable expiration intervals and max item counts.
npm install memory-cache-nodeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a cache with 10-min expiration check, max 1M items; stores permanent and expiring items; retrieves and checks existence.
Ensure both values are provided in seconds, not milliseconds.
Upgrade to 1.x and adapt to the current API.
Use storeExpiringItem with a large TTL if you want items to be cleaned up eventually.
Check using hasItem before retrieving, or handle undefined.
Run 'npm install memory-cache-node' or add to package.json.
Use correct import: import { MemoryCache } from 'memory-cache-node';Update to version >=1.0.0 and use the named import.
No dependency data recorded yet.