mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Workaround for Cache::write() call from DboSource::__destruct()
Closes #7559
This commit is contained in:
parent
bc977544c5
commit
c1b6f89b23
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue