]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not use xcache variable cache if cache size is 0.
authorAndreas Fischer <bantu@owncloud.com>
Tue, 17 Dec 2013 01:20:00 +0000 (02:20 +0100)
committerAndreas Fischer <bantu@owncloud.com>
Tue, 17 Dec 2013 01:40:16 +0000 (02:40 +0100)
This is possible because it is possible to only use xcache as an opcode cache
but not a variable cache.

lib/private/memcache/xcache.php

index 33de30562f901e7bbaef111cc823f70db700ec95..4485f9052079d590f82b8d147229d845d50dc2b6 100644 (file)
@@ -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;
        }
 }