From: Aaron Schulz Date: Wed, 25 Oct 2017 01:42:31 +0000 (-0700) Subject: Rename some cache keys with odd virtual hierarchies X-Git-Tag: 1.31.0-rc.0~1675^2 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=ab88fdd85e1a70c74d100d800018e56c31256e99;p=lhc%2Fweb%2Fwiklou.git Rename some cache keys with odd virtual hierarchies This makes automatic statsd metrics more useful. Change-Id: I07d87dcb8ce9b42cc2f1c84ac4c06d177d463b1d --- diff --git a/includes/Block.php b/includes/Block.php index 5a4c43e6ae..8d69d9a914 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -709,7 +709,7 @@ class Block { // than getting the msg raw and explode()'ing it. $cache = MediaWikiServices::getInstance()->getMainWANObjectCache(); $lines = $cache->getWithSetCallback( - $cache->makeKey( 'ipb', 'autoblock', 'whitelist' ), + $cache->makeKey( 'ip-autoblock', 'whitelist' ), $cache::TTL_DAY, function ( $curValue, &$ttl, array &$setOpts ) { $setOpts += Database::getCacheSetOptions( wfGetDB( DB_REPLICA ) ); diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index e875df5ea8..aa2610536a 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -512,7 +512,7 @@ class WikiPage implements Page, IDBAccessObject { $cache = ObjectCache::getMainWANInstance(); return $cache->getWithSetCallback( - $cache->makeKey( 'page', 'content-model', $this->getLatest() ), + $cache->makeKey( 'page-content-model', $this->getLatest() ), $cache::TTL_MONTH, function () { $rev = $this->getRevision(); diff --git a/maintenance/populateContentModel.php b/maintenance/populateContentModel.php index 74a918ae12..d99f70a10e 100644 --- a/maintenance/populateContentModel.php +++ b/maintenance/populateContentModel.php @@ -69,7 +69,7 @@ class PopulateContentModel extends Maintenance { } protected function clearCache( $page_id, $rev_id ) { - $contentModelKey = $this->wanCache->makeKey( 'page', 'content-model', $rev_id ); + $contentModelKey = $this->wanCache->makeKey( 'page-content-model', $rev_id ); $revisionKey = $this->wanCache->makeGlobalKey( 'revision', $this->wikiId, $page_id, $rev_id );