Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentinel configuration example? #2

Open
raffaeleguidi opened this issue Aug 3, 2018 · 3 comments
Open

sentinel configuration example? #2

raffaeleguidi opened this issue Aug 3, 2018 · 3 comments

Comments

@raffaeleguidi
Copy link

Hi, I have tried to mimic ioredis configuration for sentinel support, but did not manage to have it working. Do you mind posting a configuration example? My (not working) code goes like this:

var redisStore = require('cache-manager-ioredis');

var redisCache = cacheManager.caching({
  store: redisStore,
  clusterConfig: {
    sentinels: [
       { host: options.CACHE_REDIS_HOST, port: options.CACHE_REDIS_PORT },
       { host: options.CACHE_REDIS_HOST2, port: options.CACHE_REDIS_PORT }
    ],
   name: 'mymaster',
   password: options.CACHE_REDIS_PASS
  }
});
@iyangsheng
Copy link

@raffaeleguidi Finally, how to solve it

@raffaeleguidi
Copy link
Author

don't have a clue, yet

@raffaeleguidi raffaeleguidi changed the title sentil configuration example? sentinel configuration example? Nov 20, 2018
@liuwensa
Copy link

liuwensa commented Apr 26, 2021

var redisCache = cacheManager.caching({
  store: redisStore,
  sentinels: [ {host: 'xxx', port: 26379}, {host: 'xxx', port: 26380} ]
  password: 'XXXXX',
  name: 'xxxx',
  db: 0,
  ttl: 600
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants