Fix issue with Redis Cache adapter whereby setOption was being called before connecting to Redis server #4577

Closed
wants to merge 1 commit into
from
View
6 library/Zend/Cache/Storage/Adapter/RedisResourceManager.php
@@ -66,13 +66,13 @@ public function getResource($id)
$redis = new RedisResource();
+ $resource['resource'] = $redis;
+ $this->connect($resource);
+
foreach ($resource['lib_options'] as $k => $v) {
$redis->setOption($k, $v);
}
- $resource['resource'] = $redis;
- $this->connect($resource);
-
$info = $redis->info();
$resource['version'] = $info['redis_version'];
$this->resources[$id]['resource'] = $redis;