* (bug 30131) XCache with variable caching disabled no longer used for variable cachi...
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 31 Jul 2011 01:52:38 +0000 (01:52 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 31 Jul 2011 01:52:38 +0000 (01:52 +0000)
Patch from John Du Hart: https://bugzilla.wikimedia.org/attachment.cgi?id=8849&action=diff

If XCache is present, but the xcache.var_size setting is off, we'll now consider it as xcache being disabled for CACHE_ACCEL purposes. It won't trigger view of the accelerator option in the installer, and at runtime if using CACHE_ACCEL and no other modules are available, it'll throw an error so you know that it doesn't work!

RELEASE-NOTES-1.18
includes/installer/Installer.php
includes/objectcache/ObjectCache.php

index fa535c7..f7dfaba 100644 (file)
@@ -432,6 +432,7 @@ production.
 * (bug 27427) mw.util.getParamValue shouldn't return value from hash even if
   param is only present in hash.
 * Installer checked for magic_quotes_runtime instead of register_globals.
+* (bug 30131) XCache with variable caching disabled no longer used for variable caching (CACHE_ACCEL)
 
 === API changes in 1.18 ===
 * BREAKING CHANGE: action=watch now requires POST and token.
index 0b37f4a..4467428 100644 (file)
@@ -791,6 +791,9 @@ abstract class Installer {
                $caches = array();
                foreach ( $this->objectCaches as $name => $function ) {
                        if ( function_exists( $function ) ) {
+                               if ( $name == 'xcache' && !wfIniGetBool( 'xcache.var_size' ) ) {
+                                       continue;
+                               }
                                $caches[$name] = true;
                        }
                }
index 25d4d47..99e3895 100644 (file)
@@ -93,7 +93,7 @@ class ObjectCache {
                        $id = 'eaccelerator';
                } elseif ( function_exists( 'apc_fetch') ) {
                        $id = 'apc';
-               } elseif( function_exists( 'xcache_get' ) ) {
+               } elseif( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
                        $id = 'xcache';
                } elseif( function_exists( 'wincache_ucache_get' ) ) {
                        $id = 'wincache';