dabroek / node-cache-manager-ioredis

Redis store for node-cache-manager using IORedis.
MIT License
59 stars 29 forks source link

sentinel configuration example? #2

Open raffaeleguidi opened 6 years ago

raffaeleguidi commented 6 years ago

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 commented 5 years ago

@raffaeleguidi Finally, how to solve it

raffaeleguidi commented 5 years ago

don't have a clue, yet

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