diff --git a/lib/Cake/Cache/Engine/RedisEngine.php b/lib/Cake/Cache/Engine/RedisEngine.php index b8bdd4c0d..8dd98fb99 100644 --- a/lib/Cake/Cache/Engine/RedisEngine.php +++ b/lib/Cake/Cache/Engine/RedisEngine.php @@ -113,6 +113,11 @@ class RedisEngine extends CacheEngine { if (!is_int($value)) { $value = serialize($value); } + + if (!$this->_Redis->isConnected()) { + $this->_connect(); + } + if ($duration === 0) { return $this->_Redis->set($key, $value); }