Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/206310
Change subject: Automatically set $wgMainWANCache by default using
$wgMainCacheType
......................................................................
Automatically set $wgMainWANCache by default using $wgMainCacheType
Change-Id: If1ad62e4d1f84e01cd4fea04c6dd568c9d290178
---
M includes/DefaultSettings.php
M includes/Setup.php
2 files changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/10/206310/1
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 25f6206..a16a1f0 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2170,15 +2170,15 @@
$wgWANObjectCaches = array(
CACHE_NONE => array(
'class' => 'WANObjectCache',
- 'pool' => 'mediawiki-main-none',
'cacheId' => CACHE_NONE,
+ 'pool' => 'mediawiki-main-none',
'relayerConfig' => array( 'class' => 'EventRelayerNull' )
)
/* Example of a simple single data-center cache:
'memcached-php' => array(
'class' => 'WANObjectCache',
- 'pool' => 'mediawiki-main-memcached',
'cacheId' => 'memcached-php',
+ 'pool' => 'mediawiki-main-memcached',
'relayerConfig' => array( 'class' => 'EventRelayerNull' )
)
*/
diff --git a/includes/Setup.php b/includes/Setup.php
index c5c16a0..82cc1a7 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -530,6 +530,18 @@
// expecting this to exist. Should be removed sometime 1.26 or later.
$wgDisableCounters = true;
+if ( $wgMainWANCache === false ) {
+ // Setup a WAN cache from $wgMainCacheType with no relayer.
+ // Sites using multiple datacenters can configure a releyer.
+ $wgMainWANCache = 'mediawiki-main-default';
+ $wgWANObjectCaches[$wgMainWANCache] = array(
+ 'class' => 'WANObjectCache',
+ 'cacheId' => $wgMainCacheType,
+ 'pool' => 'mediawiki-main-default',
+ 'relayerConfig' => array( 'class' => 'EventRelayerNull' )
+ );
+}
+
Profiler::instance()->scopedProfileOut( $ps_default2 );
$ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc1' );
--
To view, visit https://gerrit.wikimedia.org/r/206310
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If1ad62e4d1f84e01cd4fea04c6dd568c9d290178
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits