//集群模式配置
"redis":{
"cluster":[{"port": 6379,"host": "127.0.0.1"},{"port": 6380,"host": "127.0.0.1"},{"port": 6381,"host": "127.0.0.1"}],//必填
"clusterOption":{"scaleReads": "slave"},//可选
"password":"",
"cache":true,
"mq":false,
"channels":["channel1","channel2"]
}
//单机模式配置
"redis":{
"host":"lcoalhsost:6379",
"password":"",
"cache":true,
"mq":false,
"channels":["channel1","channel2"]
}
//哨岗(sentinel)模式配置
//哨岗配置必须配置sentinels与主存的name
"redis":{
"sentinels":["lcoalhsost:26379"],
"name": "mymaster",
"password":"",
"cache":true,
"mq":false,
"channels":["channel1","channel2"]
}
cache.exeFun(command,...args)
.then(function(data){
}).cathch(function(err){
});