aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-12-18 05:36:40 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-12-18 05:36:40 -0800
commita90342b78117967388db462fec2dc7fd70edc0fa (patch)
treee66557c3707113e9c28d2af661914e0cc0b5ec1a
parent930a46e8e2696a54d79b389e7862af432202f0a4 (diff)
parentdfeb04a574a5d2f3c4288f8195e6926ac9bca4cf (diff)
downloadnextcloud-server-a90342b78117967388db462fec2dc7fd70edc0fa.tar.gz
nextcloud-server-a90342b78117967388db462fec2dc7fd70edc0fa.zip
Merge pull request #6461 from owncloud/check-xcache-varsize
Do not use xcache variable cache if cache size is 0.
-rw-r--r--lib/private/memcache/xcache.php10
1 files changed, 7 insertions, 3 deletions
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;
}
}