This commit is contained in:
the-djmaze 2024-09-15 17:42:17 +02:00
parent 12b6ed3dbb
commit 9a7ff9fe27
2 changed files with 6 additions and 3 deletions

View file

@ -47,7 +47,10 @@ class Memcache implements \MailSo\Cache\DriverInterface
public function Set(string $sKey, string $sValue) : bool
{
return $this->oMem ? $this->oMem->set($this->generateCachedKey($sKey), $sValue, 0, $this->iExpire) : false;
if ($this->oMem instanceof \Memcache) {
return $this->oMem->set($this->generateCachedKey($sKey), $sValue, 0, $this->iExpire);
}
return $this->oMem ? $this->oMem->set($this->generateCachedKey($sKey), $sValue, $this->iExpire) : false;
}
public function Exists(string $sKey) : bool