A storage adapter for the Keyv key-value store that supports multiple Redis clients, including ioredis, node-redis, and cluster-mode Redis. This adapter works where the official @keyv/redis does not, particularly with Redis cluster configurations. It is zero-dependency and passes the full Keyv test suite. Current stable version is 3.3.0, with regular updates. Key differentiator: works with many Redis clients and clusters, unlike @keyv/redis which bundles a specific ioredis version and lacks cluster support.
npm install keyv-anyredisNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to instantiate Keyv with keyv-anyredis using ioredis client, set a key with TTL, retrieve it, and delete.
Use a tested client from the README table, such as ioredis, node-redis, or fakeredis.
new KeyvAnyRedis(client.nodeRedis)
new KeyvAnyRedis(client as CompatibleRedisClient)
const client = thunkRedis.createClient({ usePromise: true }); new KeyvAnyRedis(client)Configure sentinel in your client (e.g., ioredis's sentinel options) and pass the client instance.
Use a compatible client like ioredis or node-redis which implement EventEmitter.
Check the client's documentation and ensure it supports the required methods. Use a supported client from the README.
No dependency data recorded yet.