* Put MemCachedClientforWiki in memcached-client.php so that maintenance/mctest.php doesn't crash when $wgMainCacheType is not CACHE_MEMCACHED
Based on a patch by Kim Hyun-Joon
* Jidanni
* Jimmy Xu
* Karun Dambietz
+* Kim Hyun-Joon
* liangent
* Lucas Garczewski
* Louperivois
instead of fsockopen() with fwrite().
* (bug 16884) Fixed feed links in sidebar not complying with URL parameters
of the displayed page
+* (bug 21403) memcached class renamed to MWMemecached to avoid conflict with
+ PHP's memcached extension
== API changes in 1.16 ==
'MediaWikiBagOStuff' => 'includes/BagOStuff.php',
'MediaWiki_I18N' => 'includes/SkinTemplate.php',
'MediaWiki' => 'includes/Wiki.php',
- 'memcached' => 'includes/memcached-client.php',
+ 'MemCachedClientforWiki' => 'includes/memcached-client.php',
'MessageCache' => 'includes/MessageCache.php',
'MimeMagic' => 'includes/MimeMagic.php',
'MWException' => 'includes/Exception.php',
+ 'MWMemcached' => 'includes/memcached-client.php',
'MWNamespace' => 'includes/Namespace.php',
'Namespace' => 'includes/NamespaceCompat.php', // Compat
'OldChangesList' => 'includes/ChangesList.php',
if ( $type == CACHE_MEMCACHED ) {
if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ) {
- if ( !class_exists( 'MemCachedClientforWiki' ) ) {
- class MemCachedClientforWiki extends memcached {
- function _debugprint( $text ) {
- wfDebug( "memcached: $text" );
- }
- }
- }
$wgCaches[CACHE_MEMCACHED] = new MemCachedClientforWiki(
array('persistant' => $wgMemCachedPersistent, 'compress_threshold' => 1500 ) );
$wgCaches[CACHE_MEMCACHED]->set_servers( $wgMemCachedServers );
*
* require_once 'memcached.php';
*
- * $mc = new memcached(array(
+ * $mc = new MWMemcached(array(
* 'servers' => array('127.0.0.1:10000',
* array('192.0.0.1:10010', 2),
* '127.0.0.1:10020'),
// {{{ requirements
// }}}
-// {{{ class memcached
+// {{{ class MWMemcached
/**
* memcached client class implemented using (p)fsockopen()
*
* @author Ryan T. Dean <rtdean@cytherianage.net>
* @ingroup Cache
*/
-class memcached
+class MWMemcached
{
// {{{ properties
// {{{ public
// vim: sts=3 sw=3 et
// }}}
+
+class MemCachedClientforWiki extends MWMemcached {
+ function _debugprint( $text ) {
+ wfDebug( "memcached: $text" );
+ }
+}
/** */
require_once( dirname(__FILE__) . '/commandLine.inc' );
-$mcc = new memcached( array('persistant' => true/*, 'debug' => true*/) );
+$mcc = new MWMemcached( array('persistant' => true/*, 'debug' => true*/) );
$mcc->set_servers( $wgMemCachedServers );
#$mcc->set_debug( true );