A caching library for Node.js that uses Redis with built-in pub/sub support. Version 1.0.93 provides a simple API for caching objects and arrays as JSON strings or Redis hashes, with automatic key scoping via namespace. It supports basic CRUD operations like set, get, setAll, getAll, getByIds, and hash-based operations (hmSetAll, hmSetOne, hmGetAll). Every set operation can optionally subscribe listeners to receive updates. The library wraps ioredis internally and offers TypeScript typings. Compared to other Redis cache managers, its key differentiators are the integrated pub/sub for real-time updates and the ability to cache complex data structures with automatic serialization. Release cadence appears irregular with few recent updates.
npm install redis-cache-managerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initialization, setting/getting simple keys, and using setAll/getAll with a unique ID callback.
Ensure cached values are JSON-serializable. Use a custom serialization method if needed.
Manually call Redis EXPIRE after setting or use a wrapper.
Pass full ioredis options to constructor.
Always await calls to set, get, setAll, etc.
Use import { RedisCacheManager } from 'redis-cache-manager' or const { RedisCacheManager } = require('redis-cache-manager').Pass { namespace: 'your-namespace' } to RedisCacheManager constructor.Pass listener as third argument: rcm.set('key', value, callback).