Redis standalone caching library for Node.js and cache engine for cacheman. Version 4.2.0 uses redis library 5.x. Supports Redis connection via URI, options object, or client instance. TTL support. Callback-based API. Ships TypeScript definitions. A maintained fork of cacheman-redis.
npm install recacheman-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to Redis, sets a key, retrieves it, and deletes it using callbacks.
Use consistent pattern: new CachemanRedis(options) or new CachemanRedis('redis://...') or new CachemanRedis(client).Use util.promisify or wrap in Promises: const { promisify } = require('util'); const getAsync = promisify(cache.get).bind(cache);Prefer URL string or socket options (socket.host, socket.port) instead of host/port.
Upgrade Node.js to version 20 or higher.
Use require: var CachemanRedis = require('recacheman-redis');Ensure Redis is started. Pass correct host/port or URL.
Use correct signature: cache.set(key, value, [ttl], fn). Ensure last argument is function.
Use 'new CachemanRedis()' and assign to a variable.