diff --git a/system/settings.php b/system/settings.php index 7dc98ee3..821ddd51 100644 --- a/system/settings.php +++ b/system/settings.php @@ -189,7 +189,7 @@ return [ 'cache_engine' => [ 'name' => 'Cache Engine', 'type' => 'options', - 'options' => ['auto' => 'Auto', 'file' => 'Files', 'apc' => 'APC', 'apcu' => 'APCu', 'eaccelerator' => 'eAccelerator', 'disable' => 'Disable'], + 'options' => ['auto' => 'Auto', 'file' => 'Files', 'apc' => 'APC', 'apcu' => 'APCu', 'disable' => 'Disable'], 'desc' => 'Auto is most reasonable. It will detect the best cache engine', 'default' => 'auto', 'is_config' => true, diff --git a/system/src/Cache/Cache.php b/system/src/Cache/Cache.php index b9981dce..0a369202 100644 --- a/system/src/Cache/Cache.php +++ b/system/src/Cache/Cache.php @@ -56,10 +56,6 @@ class Cache self::$instance = new APCu($prefix); break; - case 'eaccelerator': - self::$instance = new eAccelerator($prefix); - break; - case 'xcache': self::$instance = new XCache($prefix); break; @@ -93,8 +89,6 @@ class Cache return 'apc'; else if (function_exists('apcu_fetch')) return 'apcu'; - else if (function_exists('eaccelerator_get')) - return 'eaccelerator'; else if (function_exists('xcache_get') && ini_get('xcache.var_size')) return 'xcache'; diff --git a/system/src/Cache/EAccelerator.php b/system/src/Cache/EAccelerator.php deleted file mode 100644 index 58adc6d3..00000000 --- a/system/src/Cache/EAccelerator.php +++ /dev/null @@ -1,56 +0,0 @@ - - * @author Mark Samman (Talaturen) - * @copyright 2019 MyAAC - * @link https://my-aac.org - */ - -namespace MyAAC\Cache; - -class EAccelerator -{ - private $prefix; - private $enabled; - - public function __construct($prefix = '') - { - $this->prefix = $prefix; - $this->enabled = function_exists('eaccelerator_get'); - } - - public function set($key, $var, $ttl = 0) - { - $key = $this->prefix . $key; - eaccelerator_rm($key); - eaccelerator_put($key, $var, $ttl); - } - - public function get($key) - { - $tmp = ''; - if ($this->fetch($this->prefix . $key, $tmp)) { - return $tmp; - } - - return ''; - } - - public function fetch($key, &$var) - { - return ($var = eaccelerator_get($this->prefix . $key)) !== null; - } - - public function delete($key) - { - eaccelerator_rm($this->prefix . $key); - } - - public function enabled() - { - return $this->enabled; - } -}