From: Domas Mituzas Date: Sun, 19 Feb 2006 09:55:20 +0000 (+0000) Subject: add knob for persistent MC connections X-Git-Tag: 1.6.0~312 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=e86273163e7f1214b152859ddcc800f27f03c377;p=lhc%2Fweb%2Fwiklou.git add knob for persistent MC connections --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index c2f5cb51c9..a11d082ac8 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -539,6 +539,7 @@ $wgUseMemCached = false; $wgMemCachedDebug = false; # Will be set to false in Setup.php, if the server isn't working $wgMemCachedServers = array( '127.0.0.1:11000' ); $wgMemCachedDebug = false; +$wgMemCachedPersistent = false; /** * Directory for local copy of message cache, for use in addition to memcached diff --git a/includes/ObjectCache.php b/includes/ObjectCache.php index 336e0e67fc..223f5ffd5e 100644 --- a/includes/ObjectCache.php +++ b/includes/ObjectCache.php @@ -35,7 +35,7 @@ $wgCaches = array(); /** @todo document */ function &wfGetCache( $inputType ) { - global $wgCaches, $wgMemCachedServers, $wgMemCachedDebug; + global $wgCaches, $wgMemCachedServers, $wgMemCachedDebug, $wgMemCachedPersistent; $cache = false; if ( $inputType == CACHE_ANYTHING ) { @@ -61,7 +61,7 @@ function &wfGetCache( $inputType ) { } $wgCaches[CACHE_DB] = new MemCachedClientforWiki( - array('persistant' => false, 'compress_threshold' => 1500 ) ); + array('persistant' => $wgMemCachedPersistent, 'compress_threshold' => 1500 ) ); $cache =& $wgCaches[CACHE_DB]; $cache->set_servers( $wgMemCachedServers ); $cache->set_debug( $wgMemCachedDebug );