From 9a7ff9fe278b85b8c925fe171119167918c43a0e Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sun, 15 Sep 2024 17:42:17 +0200 Subject: [PATCH] Resolve #1715 --- plugins/cache-memcache/Memcache.php | 5 ++++- plugins/cache-memcache/index.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/cache-memcache/Memcache.php b/plugins/cache-memcache/Memcache.php index f967ad687..30a2812c2 100644 --- a/plugins/cache-memcache/Memcache.php +++ b/plugins/cache-memcache/Memcache.php @@ -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 diff --git a/plugins/cache-memcache/index.php b/plugins/cache-memcache/index.php index 6a7354e13..7760ab398 100644 --- a/plugins/cache-memcache/index.php +++ b/plugins/cache-memcache/index.php @@ -4,8 +4,8 @@ class CacheMemcachePlugin extends \RainLoop\Plugins\AbstractPlugin { const NAME = 'Cache Memcache', - VERSION = '2.36', - RELEASE = '2024-03-22', + VERSION = '2.37', + RELEASE = '2024-09-15', REQUIRED = '2.36.0', CATEGORY = 'Cache', DESCRIPTION = 'Cache handler using PHP Memcache or PHP Memcached';