Move the "v1" to an adjacent key component in Title::loadRestrictions
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 20 Mar 2019 01:21:18 +0000 (18:21 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 20 Mar 2019 01:21:18 +0000 (18:21 -0700)
This keeps the WAN cache statsd metrics under page-restrictions as before

Change-Id: I30b716cbc362c98f09ba77a4b3f68a821d966d44

includes/Title.php

index 2e43b8d..d8aeb62 100644 (file)
@@ -3342,7 +3342,7 @@ class Title implements LinkTarget, IDBAccessObject {
                                $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
                                $rows = $cache->getWithSetCallback(
                                        // Page protections always leave a new null revision
-                                       $cache->makeKey( 'page-restrictions-v1', $id, $this->getLatestRevID() ),
+                                       $cache->makeKey( 'page-restrictions', 'v1', $id, $this->getLatestRevID() ),
                                        $cache::TTL_DAY,
                                        function ( $curValue, &$ttl, array &$setOpts ) use ( $loadRestrictionsFromDb ) {
                                                $dbr = wfGetDB( DB_REPLICA );