Page MenuHomePhabricator

xcacheFix.patch

Authored By
bzimport
Nov 21 2014, 11:57 PM
Size
1 KB
Referenced Files
None
Subscribers
None

xcacheFix.patch

diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 8cdde63..c53a3aa 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -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;
}
}
diff --git a/includes/objectcache/ObjectCache.php b/includes/objectcache/ObjectCache.php
index 25d4d47..99e3895 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -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';

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7851
Default Alt Text
xcacheFix.patch (1 KB)

Event Timeline