Redis Cluster keyPrefix doesn't work in redisOptions
See original GitHub issueversion: 4.14.1 According to doc, I think keyPrefix in redisOptions. But it doesn’t work. Like blow:
const redisClient = new Redis.Cluster(nodes, {
redisOptions: {
keyPrefix: 'foo:',
}
});
After attempts, it actually works in root option, like this:
const redisClient = new Redis.Cluster(nodes, {
keyPrefix: 'foo:',
});
Is it by design?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:8
Top Results From Across the Web
How to use the ioredis.Cluster function in ioredis - Snyk
Cluster examples, based on popular ways it is used in public projects. ... var options = { keyPrefix: config.redis_prefix, password: config.redis_password }; ...
Read more >Redis (node using ioredis) clusterRetryStrategy exception ...
I have a local setup on a mac running a redis cluster with 6 nodes. ... slotsRefreshInterval: 10000, redisOptions: { keyPrefix: this.
Read more >nestjs-redis-cluster - npm
Start using nestjs-redis-cluster in your project by running `npm ... There are no other projects in the npm registry using nestjs-redis-cluster.
Read more >API - ioredis - Read the Docs
While loading, the server not respond to any commands. To work around this, when this option is true , ioredis will check the...
Read more >Configuration | StackExchange.Redis
We run this command to verify that we have a valid connection to the Redis ... a serviceName in the connection string, it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue was left to die on the vine with an open PR, but it is critical to the functionality of key prefixing. The workaround is to include
keyPrefix
one level up (on the object which is the second parameter tonew Cluster
) but the type definitions will yell at you for trying to do that. So you end up having to do something like this:It would be great if this PR were merged and this was resolved.
would be nice if the fix be ported to 4.x