[Pkg-owncloud-commits] [owncloud] 27/104: Do not use xcache variable cache if cache size is 0.

David Prévot taffit at moszumanska.debian.org
Sat Jan 18 13:33:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit d9df271113f2eb30a13173e075e8b92d3d9e313b
Author: Andreas Fischer <bantu at owncloud.com>
Date:   Tue Dec 17 02:20:00 2013 +0100

    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.
---
 lib/private/memcache/xcache.php | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/private/memcache/xcache.php b/lib/private/memcache/xcache.php
index 33de305..4485f90 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;
 	}
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list