From: Andreas Fischer Date: Tue, 17 Dec 2013 01:20:00 +0000 (+0100) Subject: Do not use xcache variable cache if cache size is 0. X-Git-Tag: v7.0.0alpha2~1012^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dfeb04a574a5d2f3c4288f8195e6926ac9bca4cf;p=nextcloud-server.git Do not use xcache variable cache if cache size is 0. This is possible because it is possible to only use xcache as an opcode cache but not a variable cache. --- diff --git a/lib/private/memcache/xcache.php b/lib/private/memcache/xcache.php index 33de30562f9..4485f905207 100644 --- a/lib/private/memcache/xcache.php +++ b/lib/private/memcache/xcache.php @@ -44,11 +44,15 @@ class XCache extends Cache { static public function isAvailable(){ if (!extension_loaded('xcache')) { return false; - } elseif (\OC::$CLI) { + } + if (\OC::$CLI) { return false; - }else{ - return true; } + $var_size = (int) ini_get('xcache.var_size'); + if (!$var_size) { + return false; + } + return true; } }