[Cache] Dont use pipelining with RedisCluster
This commit is contained in:
parent
ec4689122c
commit
eb93ac904c
@ -303,6 +303,14 @@ class RedisAdapter extends AbstractAdapter
|
||||
foreach ($results as $k => list($h, $c)) {
|
||||
$results[$k] = $connections[$h][$c];
|
||||
}
|
||||
} elseif ($this->redis instanceof \RedisCluster) {
|
||||
// phpredis doesn't support pipelining with RedisCluster
|
||||
// see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining
|
||||
$result = array();
|
||||
foreach ($generator() as $command => $args) {
|
||||
$ids[] = $args[0];
|
||||
$result[] = call_user_func_array(array($this->redis, $command), $args);
|
||||
}
|
||||
} else {
|
||||
$this->redis->multi(\Redis::PIPELINE);
|
||||
foreach ($generator() as $command => $args) {
|
||||
|
Reference in New Issue
Block a user