An abstract-cache compliant Redis client that implements the await-style protocol. Version 2.0.0 wraps ioredis and provides methods like keys, scan, scanStream, disconnect, and quit on top of the standard abstract-cache API. It connects to localhost:6379 by default or accepts a pre-connected ioredis client. The package is feature-complete and sees low maintenance cadence; it is best used with abstract-cache to swap between different cache backends.
npm install abstract-cache-redisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Redis cache client, sets a key with TTL, checks existence, scans keys, and closes the connection.
Always pass a numeric TTL (e.g., 1000 for 1 second).
Provide at least one of `ioredis` or `client` options.
Call `client.quit()` or `client.disconnect()` when done.
Avoid relying on these methods; use abstract-cache's standard `keys` instead.
Run `npm install abstract-cache-redis` and ensure node_modules is available.
Call the factory: `require('abstract-cache-redis')({ ioredis: {} })`.Delete the key (`client.del('key')`) or ensure key type matches.