Have LinkCache::getMutableCacheKeys() accept LinkTarget
authorKunal Mehta <legoktm@member.fsf.org>
Wed, 15 Aug 2018 05:56:27 +0000 (22:56 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Wed, 15 Aug 2018 05:56:27 +0000 (22:56 -0700)
Change-Id: Id84590b3aa285e31a358877167fe8ff502077f3c

includes/cache/LinkCache.php
includes/page/WikiPage.php

index 260038a..9e182c7 100644 (file)
@@ -283,11 +283,11 @@ class LinkCache {
 
        /**
         * @param WANObjectCache $cache
-        * @param TitleValue $t
+        * @param LinkTarget $t
         * @return string[]
         * @since 1.28
         */
-       public function getMutableCacheKeys( WANObjectCache $cache, TitleValue $t ) {
+       public function getMutableCacheKeys( WANObjectCache $cache, LinkTarget $t ) {
                if ( $this->isCacheable( $t ) ) {
                        return [ $cache->makeKey( 'page', $t->getNamespace(), sha1( $t->getDBkey() ) ) ];
                }
index 661faa7..c3df0e5 100644 (file)
@@ -3478,7 +3478,7 @@ class WikiPage implements Page, IDBAccessObject {
        public function getMutableCacheKeys( WANObjectCache $cache ) {
                $linkCache = MediaWikiServices::getInstance()->getLinkCache();
 
-               return $linkCache->getMutableCacheKeys( $cache, $this->getTitle()->getTitleValue() );
+               return $linkCache->getMutableCacheKeys( $cache, $this->getTitle() );
        }
 
 }