Merge "Made ReplicatedBagOStuff wrapping the SQL class the default stash"
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index 45102ee..0e6ff16 100644 (file)
@@ -2175,6 +2175,19 @@ $wgObjectCaches = array(
        CACHE_ACCEL => array( 'factory' => 'ObjectCache::newAccelerator' ),
        CACHE_MEMCACHED => array( 'factory' => 'ObjectCache::newMemcached', 'loggroup' => 'memcached' ),
 
+       'db-replicated' => array(
+               'class'       => 'ReplicatedBagOStuff',
+               'readFactory' => array(
+                       'class' => 'SqlBagOStuff',
+                       'args'  => array( array( 'slaveOnly' => true ) )
+               ),
+               'writeFactory' => array(
+                       'class' => 'SqlBagOStuff',
+                       'args'  => array( array( 'slaveOnly' => false ) )
+               ),
+               'loggroup'  => 'SQLBagOStuff'
+       ),
+
        'apc' => array( 'class' => 'APCBagOStuff' ),
        'xcache' => array( 'class' => 'XCacheBagOStuff' ),
        'wincache' => array( 'class' => 'WinCacheBagOStuff' ),
@@ -2237,6 +2250,7 @@ $wgWANObjectCaches = array(
  * lightweight data like hit counters and user activity. Sites with multiple
  * data-centers should have this use a store that replicates all writes. The
  * store should have enough consistency for CAS operations to be usable.
+ * Reads outside of those needed for merge() may be eventually consistent.
  *
  * The options are:
  *   - db:      Store cache objects in the DB
@@ -2245,7 +2259,7 @@ $wgWANObjectCaches = array(
  *
  * @since 1.26
  */
-$wgMainStash = 'db';
+$wgMainStash = 'db-replicated';
 
 /**
  * The expiry time for the parser cache, in seconds.