From 478bd36d0c958a635700ee7c1b4bc3c89912aaac Mon Sep 17 00:00:00 2001 From: Nikos M Date: Sat, 27 Oct 2018 13:14:49 +0300 Subject: [PATCH] change isSupported() checks --- src/php/adapters/UnicacheApcu.php | 3 ++- src/php/adapters/UnicacheXCache.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/php/adapters/UnicacheApcu.php b/src/php/adapters/UnicacheApcu.php index 39af697..0ef074c 100644 --- a/src/php/adapters/UnicacheApcu.php +++ b/src/php/adapters/UnicacheApcu.php @@ -4,7 +4,8 @@ class UNICACHE_APCUCache extends UNICACHE_Cache { public static function isSupported( ) { - return (function_exists('apcu_fetch') && function_exists('apcu_store') && function_exists('apcu_delete')); + return extension_loaded('apcu'); + //return (function_exists('apcu_fetch') && function_exists('apcu_store') && function_exists('apcu_delete')); } public function get( $key ) diff --git a/src/php/adapters/UnicacheXCache.php b/src/php/adapters/UnicacheXCache.php index 36bd187..3a52b5f 100644 --- a/src/php/adapters/UnicacheXCache.php +++ b/src/php/adapters/UnicacheXCache.php @@ -4,7 +4,8 @@ class UNICACHE_XCache extends UNICACHE_Cache { public static function isSupported( ) { - return (function_exists('xcache_get') && function_exists('xcache_set') && function_exists('xcache_unset')); + return extension_loaded('xcache'); + //return (function_exists('xcache_get') && function_exists('xcache_set') && function_exists('xcache_unset')); } public function get( $key )