A Redis caching library (v5.1.0) designed to integrate with exp-asynccache. It provides a simple interface for caching values in Redis with optional TTL via SETEX, supports key namespacing, and configures the underlying Redis client's offline queue behavior. Stable release, actively maintained, no major updates in recent months. Differentiator: lightweight, relies on exp-asynccache for async caching patterns, minimal setup.
npm install exp-rediscacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a RedisCache with custom host, port, offline queue disabled, and key prefix; shows lookup with TTL.
Set `enableOfflineQueue: false` in RedisCache options to fail fast.
Consider migrating to a package that uses `ioredis` or newer `redis` v4 for future-proofing.
Include a separator in the prefix value, e.g., `keyPrefix: 'myapp:'`.
Ensure you import the named export: `import { RedisCache } from 'exp-rediscache'`.Add `password` option to RedisCache constructor: `new RedisCache({ password: 'yourpassword' })`.Start Redis: `redis-server` or adjust host/port options.