From: Aaron Schulz Date: Thu, 17 Aug 2017 03:07:30 +0000 (-0700) Subject: rdbms: Rename "memCache" to "memStash" in LBFactory X-Git-Tag: 1.31.0-rc.0~2372^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=04a05a2bb92f70889bde1385afa696d3baa5eeb7;p=lhc%2Fweb%2Fwiklou.git rdbms: Rename "memCache" to "memStash" in LBFactory This needs to be cross DC, so fix the name and comments. Also update the one MWLBFactory reference to it. Change-Id: I5ef10000276c300299fd1ece35ada0d78388bef7 --- diff --git a/includes/db/MWLBFactory.php b/includes/db/MWLBFactory.php index 464a91827f..5196ac2d64 100644 --- a/includes/db/MWLBFactory.php +++ b/includes/db/MWLBFactory.php @@ -149,7 +149,7 @@ abstract class MWLBFactory { } $cCache = ObjectCache::getLocalClusterInstance(); if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) { - $lbConf['memCache'] = $cCache; + $lbConf['memStash'] = $cCache; } $wCache = MediaWikiServices::getInstance()->getMainWANObjectCache(); if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) { diff --git a/includes/libs/rdbms/lbfactory/ILBFactory.php b/includes/libs/rdbms/lbfactory/ILBFactory.php index 117df684c4..ff6635d5bf 100644 --- a/includes/libs/rdbms/lbfactory/ILBFactory.php +++ b/includes/libs/rdbms/lbfactory/ILBFactory.php @@ -44,7 +44,7 @@ interface ILBFactory { * - localDomain: A DatabaseDomain or domain ID string. * - readOnlyReason : Reason the master DB is read-only if so [optional] * - srvCache : BagOStuff object for server cache [optional] - * - memCache : BagOStuff object for cluster memory cache [optional] + * - memStash : BagOStuff object for cross-datacenter memory storage [optional] * - wanCache : WANObjectCache object [optional] * - hostname : The name of the current server [optional] * - cliMode: Whether the execution context is a CLI script. [optional] diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php index 919f103be1..c891fb6ba7 100644 --- a/includes/libs/rdbms/lbfactory/LBFactory.php +++ b/includes/libs/rdbms/lbfactory/LBFactory.php @@ -55,7 +55,7 @@ abstract class LBFactory implements ILBFactory { /** @var BagOStuff */ protected $srvCache; /** @var BagOStuff */ - protected $memCache; + protected $memStash; /** @var WANObjectCache */ protected $wanCache; @@ -93,7 +93,7 @@ abstract class LBFactory implements ILBFactory { } $this->srvCache = isset( $conf['srvCache'] ) ? $conf['srvCache'] : new EmptyBagOStuff(); - $this->memCache = isset( $conf['memCache'] ) ? $conf['memCache'] : new EmptyBagOStuff(); + $this->memStash = isset( $conf['memStash'] ) ? $conf['memStash'] : new EmptyBagOStuff(); $this->wanCache = isset( $conf['wanCache'] ) ? $conf['wanCache'] : WANObjectCache::newEmpty(); @@ -435,7 +435,7 @@ abstract class LBFactory implements ILBFactory { } $this->chronProt = new ChronologyProtector( - $this->memCache, + $this->memStash, [ 'ip' => $this->requestInfo['IPAddress'], 'agent' => $this->requestInfo['UserAgent'],