some fixes for warnings during phpUnit about caching

This commit is contained in:
Ralf Becker 2020-03-04 20:27:10 +01:00
parent 19a7894269
commit c85f1f3d05
2 changed files with 7 additions and 3 deletions

View File

@ -769,9 +769,10 @@ class Cache
if (is_null(Cache::$default_provider))
{
Cache::$default_provider =
function_exists('apcu_fetch') && Cache\Apcu::available() ? 'EGroupware\Api\Cache\Apcu' :
(function_exists('apc_fetch') && Cache\Apc::available() ? 'EGroupware\Api\Cache\Apc' :
'EGroupware\Api\Cache\Files');
PHP_SAPI === 'cli' ? 'EGroupware\Api\Cache\Files' :
(function_exists('apcu_fetch') && Cache\Apcu::available() ? 'EGroupware\Api\Cache\Apcu' :
(function_exists('apc_fetch') && Cache\Apc::available() ? 'EGroupware\Api\Cache\Apc' :
'EGroupware\Api\Cache\Files'));
}
//error_log('Cache::$default_provider='.array2string(Cache::$default_provider));

View File

@ -13,6 +13,9 @@
namespace EGroupware\Api\Cache;
// fix warning in tests, if memcache extension not available
if (defined('MEMCACHE_COMPRESSED')) define('MEMCACHE_COMPRESSED', 2);
/**
* Caching provider storing data in memcached via PHP's memcache extension
*