In-memory caching library for Node.js, also usable as a cache engine for recacheman. Version 2.1.0 targets Node.js 20 and 22. Fork of cacheman-memory with active maintenance. Provides promise-based and callback-based API, TTL support, and TypeScript declarations. Differentiated by simplicity and zero external dependencies.
npm install recacheman-memoryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM usage with promises: set, get, and delete a cache entry.
Upgrade to Node.js 20+ or use recacheman-memory@1.x for older Node versions.
Use promise chaining or async/await instead of callbacks.
Check for `null` explicitly when retrieving values.
Convert milliseconds to seconds before passing TTL.
Use `import CachemanMemory from 'recacheman-memory'` then `new CachemanMemory()`.
Use `import` or set `type: "module"` in package.json and use `createRequire` if needed.
Check documentation; use `cache.getAll()` exists in v2.
No dependency data recorded yet.