- $linkCache = MediaWikiServices::getInstance()->getLinkCache();
- $linkCache->addLinkObj( $this ); # in case we already had an article ID
- $cached = $linkCache->getGoodLinkFieldObj( $this, 'redirect' );
- if ( $cached === null ) {
- # Trust LinkCache's state over our own
- # LinkCache is telling us that the page doesn't exist, despite there being cached
- # data relating to an existing page in $this->mArticleID. Updaters should clear
- # LinkCache as appropriate, or use $flags = Title::GAID_FOR_UPDATE. If that flag is
- # set, then LinkCache will definitely be up to date here, since getArticleID() forces
- # LinkCache to refresh its data from the master.
- $this->mRedirect = false;
- return $this->mRedirect;
- }