mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 06:58:27 +03:00
Merge pull request #132 from Alphix/redis_setex_fix
[redis] Fix call to setex()
This commit is contained in:
commit
74a1b72703
1 changed files with 8 additions and 1 deletions
|
|
@ -70,7 +70,14 @@ class Redis implements \MailSo\Cache\DriverInterface
|
|||
|
||||
public function Set(string $sKey, string $sValue) : bool
|
||||
{
|
||||
return $this->oRedis ? $this->oRedis->setex($this->generateCachedKey($sKey), $this->iExpire, $sValue) : false;
|
||||
if (!$this->oRedis)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$sValue = $this->oRedis->setex($this->generateCachedKey($sKey), $this->iExpire, $sValue);
|
||||
|
||||
return $sValue === true || $sValue == 'OK';
|
||||
}
|
||||
|
||||
public function Get(string $sKey) : string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue