diff --git a/src/Symfony/Component/Cache/Adapter/RedisAdapter.php b/src/Symfony/Component/Cache/Adapter/RedisAdapter.php index 377212df75..f84ffa5e48 100644 --- a/src/Symfony/Component/Cache/Adapter/RedisAdapter.php +++ b/src/Symfony/Component/Cache/Adapter/RedisAdapter.php @@ -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) {