【发布时间】:2017-02-15 05:40:11
【问题描述】:
我正在尝试通过 nodejs 中的 redis 集群中的键数组获取值, 它返回错误:“管道中的所有键都应该属于同一个插槽” 这是代码:
private GETALL_P(keys: string[], cb: any) {
var pipeline = this.client.pipeline();
keys.forEach(function (key: string, index: Number) {
pipeline.get(key);
});
pipeline.exec(function (err: any, result: any) {
cb(err, result);
});
}
我搜索了,有人说:它不适用于集群。 有没有办法做到这一点?
【问题讨论】:
标签: node.js redis redis-cluster