Simplistic Node.js Redis caching module with generic-pool support for scalable, multithreaded environments. Version 6.4.2 provides a straightforward API (init, set, get) with connection pooling, configurable TTL, custom logging, and statistics. Requires Redis 4+ and Node.js 8+. Features UNLINK-based deletion and pattern deletion via redis.replicate_commands().
npm install node-cache-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the cache, sets a value, retrieves it, and deletes it using async/await.
Review migration guide for v4.0.0 at https://github.com/pasupulaphani/node-cache-redis/releases/tag/v4.0.0
Upgrade Redis server to version 4 or later.
Call init() at the start of your application.
Pass ttlInSeconds option to init() to avoid memory leaks.
Wrap set/get/del in async function and use await.
Ensure Redis is started on localhost:6379 or provide correct redisOptions.
Call init() before any cache operations.