From: Aaron Schulz Date: Sat, 27 Sep 2008 22:51:59 +0000 (+0000) Subject: objectcache cleanup (bug 7474) X-Git-Tag: 1.31.0-rc.0~45063 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=dd6cb210aeb63b7bc21755c17ed28487c7df6785;p=lhc%2Fweb%2Fwiklou.git objectcache cleanup (bug 7474) --- diff --git a/includes/ObjectCache.php b/includes/ObjectCache.php index 01b61dfb77..07525acea7 100644 --- a/includes/ObjectCache.php +++ b/includes/ObjectCache.php @@ -48,23 +48,21 @@ function &wfGetCache( $inputType ) { } if ( $type == CACHE_MEMCACHED ) { - if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ){ + if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ) { require_once( 'memcached-client.php' ); - - if (!class_exists("MemcachedClientforWiki")) { + if ( !class_exists("MemcachedClientforWiki") ) { class MemCachedClientforWiki extends memcached { function _debugprint( $text ) { wfDebug( "memcached: $text" ); } } } - - $wgCaches[CACHE_DB] = new MemCachedClientforWiki( + $wgCaches[CACHE_MEMCACHED] = new MemCachedClientforWiki( array('persistant' => $wgMemCachedPersistent, 'compress_threshold' => 1500 ) ); - $cache =& $wgCaches[CACHE_DB]; - $cache->set_servers( $wgMemCachedServers ); - $cache->set_debug( $wgMemCachedDebug ); + $wgCaches[CACHE_MEMCACHED]->set_servers( $wgMemCachedServers ); + $wgCaches[CACHE_MEMCACHED]->set_debug( $wgMemCachedDebug ); } + $cache =& $wgCaches[CACHE_MEMCACHED]; } elseif ( $type == CACHE_ACCEL ) { if ( !array_key_exists( CACHE_ACCEL, $wgCaches ) ) { if ( function_exists( 'eaccelerator_get' ) ) {