From: Steve Sanbeg Date: Wed, 21 Nov 2007 23:07:36 +0000 (+0000) Subject: cache template redirects, since we were already checking cache for them X-Git-Tag: 1.31.0-rc.0~50756 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=f193a1b2e8bad94eb9771a5e9858611679b900e5;p=lhc%2Fweb%2Fwiklou.git cache template redirects, since we were already checking cache for them --- diff --git a/includes/Parser.php b/includes/Parser.php index 26f0f986b9..e07157bfcd 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3377,6 +3377,7 @@ class Parser * and its redirect destination title. Cached. */ function getTemplateDom( $title ) { + $cacheTitle = $title; $titleText = $title->getPrefixedDBkey(); if ( isset( $this->mTplRedirCache[$titleText] ) ) { @@ -3410,7 +3411,14 @@ class Parser } $dom = $this->preprocessToDom( $text ); - $this->mTplDomCache[$titleText] = $dom; + + $this->mTplDomCache[ $titleText ] = $dom; + + if (! $title->equals($cacheTitle)) { + $this->mTplRedirCache[$cacheTitle->getPrefixedDBkey()] = + array( $title->getNamespace(),$cdb = $title->getDBkey() ); + } + return array( $dom, $title ); }