From c197d021bb85e0d497527839746a1b37846ad30a Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 2 Oct 2019 00:38:22 +0100 Subject: [PATCH] Memcache hasn't been supported since php5 - we use Memcached now --- core/cacheengine.php | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/core/cacheengine.php b/core/cacheengine.php index 4d5fc05f..cf471d54 100644 --- a/core/cacheengine.php +++ b/core/cacheengine.php @@ -20,34 +20,6 @@ class NoCache implements CacheEngine } } -class MemcacheCache implements CacheEngine -{ - /** @var ?Memcache */ - public $memcache=null; - - public function __construct(string $args) - { - $hp = explode(":", $args); - $this->memcache = new Memcache; - @$this->memcache->pconnect($hp[0], $hp[1]); - } - - public function get(string $key) - { - return $this->memcache->get($key); - } - - public function set(string $key, $val, int $time=0) - { - $this->memcache->set($key, $val, false, $time); - } - - public function delete(string $key) - { - $this->memcache->delete($key); - } -} - class MemcachedCache implements CacheEngine { /** @var ?Memcached */ @@ -171,9 +143,7 @@ class Cache $matches = []; $c = null; if ($dsn && preg_match("#(.*)://(.*)#", $dsn, $matches) && !isset($_GET['DISABLE_CACHE'])) { - if ($matches[1] == "memcache") { - $c = new MemcacheCache($matches[2]); - } elseif ($matches[1] == "memcached") { + if ($matches[1] == "memcached") { $c = new MemcachedCache($matches[2]); } elseif ($matches[1] == "apc") { $c = new APCCache($matches[2]);