It was never super popular anyway, APC was always the best option.
The project has no plans to move to PHP7, so it's quickly reaching
its end of life. Oh, and Fedora dropped it from their repos 2 years
ago.
Change-Id: Ia3257e86a6323d8943f04a5c05c72c0bd4c4b0a9
* $wgFragmentMode is now set to [ 'legacy', 'html5' ] by default. This is a first step of
migration to human-readable section IDs that will later result in 'html5' being the
default mode.
+* CACHE_ACCEL now only supports APC(u) or WinCache. XCache support was removed
+ as upstream is inactive and has no plans to move to PHP 7.
=== New features in 1.31 ===
* Wikimedia\Rdbms\IDatabase->select() and similar methods now support
'WordLevelDiff' => __DIR__ . '/includes/diff/WordLevelDiff.php',
'WrapOldPasswords' => __DIR__ . '/maintenance/wrapOldPasswords.php',
'XCFHandler' => __DIR__ . '/includes/media/XCF.php',
- 'XCacheBagOStuff' => __DIR__ . '/includes/libs/objectcache/XCacheBagOStuff.php',
'XMLRCFeedFormatter' => __DIR__ . '/includes/rcfeed/XMLRCFeedFormatter.php',
'XMPInfo' => __DIR__ . '/includes/libs/xmp/XMPInfo.php',
'XMPReader' => __DIR__ . '/includes/libs/xmp/XMP.php',
Distributors might choose to install these automatically with MediaWiki and
perhaps configure it to use them (see Configuration section of this document):
- * APC (Alternative PHP Cache), XCache, or similar: Will greatly speed up the
+ * APC (Alternative PHP Cache) or similar: Will greatly speed up the
execution of MediaWiki, and all other PHP applications, at some cost in
memory usage. Will be used automatically for the most part.
* clamav: Can be used for virus scanning of uploaded files. Enable with
"$wgAntivirus = 'clamav';".
* DjVuLibre: Allows processing of DjVu files. To enable this, set
"$wgDjvuDump = 'djvudump'; $wgDjvuRenderer = 'ddjvu'; $wgDjvuTxt = 'djvutxt';".
- * HTML Tidy: Fixes errors in HTML at runtime. Can be enabled with
+ * HTML Tidy: Fixes errors in HTML at runtime. Can be enabled with
"$wgUseTidy = true;".
* ImageMagick: For resizing images. "$wgUseImageMagick = true;" will enable
it. PHP's GD can also be used, but ImageMagick is preferable.
* - CACHE_NONE: Do not cache
* - CACHE_DB: Store cache objects in the DB
* - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
- * - CACHE_ACCEL: APC, APCU, XCache or WinCache
+ * - CACHE_ACCEL: APC, APCU or WinCache
* - (other): A string may be used which identifies a cache
* configuration in $wgObjectCaches.
*
'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ],
'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
- 'xcache' => [ 'class' => XCacheBagOStuff::class, 'reportDupes' => false ],
'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
define( 'CACHE_NONE', 0 ); // Do not cache
define( 'CACHE_DB', 1 ); // Store cache objects in the DB
define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
-define( 'CACHE_ACCEL', 3 ); // APC, XCache or WinCache
+define( 'CACHE_ACCEL', 3 ); // APC or WinCache
/**@}*/
/**@{
$id = 'apc';
} elseif ( function_exists( 'apcu_fetch' ) ) {
$id = 'apcu';
- } elseif ( function_exists( 'xcache_get' ) && wfIniGetBool( 'xcache.var_size' ) ) {
- $id = 'xcache';
} elseif ( function_exists( 'wincache_ucache_get' ) ) {
$id = 'wincache';
} else {
* @var array
*/
protected $objectCaches = [
- 'xcache' => 'xcache_get',
'apc' => 'apc_fetch',
'apcu' => 'apcu_fetch',
'wincache' => 'wincache_ucache_get'
$caches = [];
foreach ( $this->objectCaches as $name => $function ) {
if ( function_exists( $function ) ) {
- if ( $name == 'xcache' && !wfIniGetBool( 'xcache.var_size' ) ) {
- continue;
- }
$caches[$name] = true;
}
}
"config-pcre-no-utf8": "<strong>Fatal:</strong> PHP's PCRE module seems to be compiled without PCRE_UTF8 support.\nMediaWiki requires UTF-8 support to function correctly.",
"config-memory-raised": "PHP's <code>memory_limit</code> is $1, raised to $2.",
"config-memory-bad": "<strong>Warning:</strong> PHP's <code>memory_limit</code> is $1.\nThis is probably too low.\nThe installation may fail!",
- "config-xcache": "[https://xcache.lighttpd.net/ XCache] is installed",
"config-apc": "[http://www.php.net/apc APC] is installed",
"config-apcu": "[http://www.php.net/apcu APCu] is installed",
"config-wincache": "[https://www.iis.net/download/WinCacheForPhp WinCache] is installed",
- "config-no-cache-apcu": "<strong>Warning:</strong> Could not find [http://www.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache].\nObject caching is not enabled.",
+ "config-no-cache-apcu": "<strong>Warning:</strong> Could not find [http://www.php.net/apcu APCu] or [http://www.iis.net/download/WinCacheForPhp WinCache].\nObject caching is not enabled.",
"config-mod-security": "<strong>Warning:</strong> Your web server has [https://modsecurity.org/ mod_security]/mod_security2 enabled. Many common configurations of this will cause problems for MediaWiki and other software that allows users to post arbitrary content.\nIf possible, this should be disabled. Otherwise, refer to [https://modsecurity.org/documentation/ mod_security documentation] or contact your host's support if you encounter random errors.",
"config-diff3-bad": "GNU diff3 not found.",
"config-git": "Found the Git version control software: <code>$1</code>.",
"config-cache-options": "Settings for object caching:",
"config-cache-help": "Object caching is used to improve the speed of MediaWiki by caching frequently used data.\nMedium to large sites are highly encouraged to enable this, and small sites will see benefits as well.",
"config-cache-none": "No caching (no functionality is removed, but speed may be impacted on larger wiki sites)",
- "config-cache-accel": "PHP object caching (APC, APCu, XCache or WinCache)",
+ "config-cache-accel": "PHP object caching (APC, APCu or WinCache)",
"config-cache-memcached": "Use Memcached (requires additional setup and configuration)",
"config-memcached-servers": "Memcached servers:",
"config-memcached-help": "List of IP addresses to use for Memcached.\nShould specify one per line and specify the port to be used. For example:\n 127.0.0.1:11211\n 192.168.1.25:1234",
"config-pcre-no-utf8": "PCRE is a name of a programmers' library for supporting regular expressions. It can probably be translated without change.\n{{Related|Config-fatal}}",
"config-memory-raised": "Parameters:\n* $1 is the configured <code>memory_limit</code>.\n* $2 is the value to which <code>memory_limit</code> was raised.",
"config-memory-bad": "Parameters:\n* $1 is the configured <code>memory_limit</code>.",
- "config-xcache": "Message indicates if this program is available",
"config-apc": "Message indicates if this program is available",
"config-apcu": "Message indicates if this program is available",
"config-wincache": "Message indicates if this program is available",
/**
* @see FileBackend::__construct()
* Additional $config params include:
- * - srvCache : BagOStuff cache to APC/XCache or the like.
+ * - srvCache : BagOStuff cache to APC or the like.
* - wanCache : WANObjectCache object to use for persistent caching.
* - mimeCallback : Callback that takes (storage path, content, file system path) and
* returns the MIME type of the file or 'unknown/unknown'. The file
* - levels : the number of hash levels (and digits)
* - repeat : hash subdirectories are prefixed with all the
* parent hash directory names (e.g. "a/ab/abc")
- * - cacheAuthInfo : Whether to cache authentication tokens in APC, XCache, ect.
+ * - cacheAuthInfo : Whether to cache authentication tokens in APC, etc.
* If those are not available, then the main cache will be used.
* This is probably insecure in shared hosting environments.
* - rgwS3AccessKey : Rados Gateway S3 "access key" value on the account.
+++ /dev/null
-<?php
-/**
- * Object caching using XCache.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Cache
- */
-
-/**
- * Wrapper for XCache object caching functions; identical interface
- * to the APC wrapper
- *
- * @ingroup Cache
- */
-class XCacheBagOStuff extends BagOStuff {
- protected function doGet( $key, $flags = 0 ) {
- $val = xcache_get( $key );
-
- if ( is_string( $val ) ) {
- if ( $this->isInteger( $val ) ) {
- $val = intval( $val );
- } else {
- $val = unserialize( $val );
- }
- } elseif ( is_null( $val ) ) {
- return false;
- }
-
- return $val;
- }
-
- public function set( $key, $value, $expire = 0, $flags = 0 ) {
- if ( !$this->isInteger( $value ) ) {
- $value = serialize( $value );
- }
-
- xcache_set( $key, $value, $expire );
- return true;
- }
-
- public function delete( $key ) {
- xcache_unset( $key );
- return true;
- }
-
- public function incr( $key, $value = 1 ) {
- return xcache_inc( $key, $value );
- }
-
- public function decr( $key, $value = 1 ) {
- return xcache_dec( $key, $value );
- }
-}
$counter = null; // post-increment persistent counter value
- // Use APC/eAccelerator/xcache if requested, available, and not in CLI mode;
+ // Use APC/etc if requested, available, and not in CLI mode;
// Counter values would not survive accross script instances in CLI mode.
$cache = null;
if ( ( $flags & self::QUICK_VOLATILE ) && !wfIsCLI() ) {
x
xanalytics
xbitmap
-xcache
xcancel
xdebug
xdiff
CACHE_MEMCACHED => $hashCache,
'apc' => $hashCache,
'apcu' => $hashCache,
- 'xcache' => $hashCache,
'wincache' => $hashCache,
] + $baseConfig->get( 'ObjectCaches' );