r83476 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83475‎ | r83476 | r83477 >
Date:19:13, 7 March 2011
Author:platonides
Status:ok
Tags:
Comment:
Merge corrected r81741 and resolve the TODO.
Keep disabled with a class constant.
Modified paths:
  • /trunk/phase3/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserCache.php
@@ -11,6 +11,7 @@
1212 */
1313 class ParserCache {
1414 private $mMemc;
 15+ const try116cache = false; /* Only useful $wgParserCacheExpireTime after updating to 1.17 */
1516
1617 /**
1718 * Get an instance of this object
@@ -118,8 +119,9 @@
119120 $usedOptions = $optionsKey->mUsedOptions;
120121 wfDebug( "Parser cache options found.\n" );
121122 } else {
122 - # TODO: Fail here $wgParserCacheExpireTime after deployment unless $useOutdated
123 -
 123+ if ( !$useOutdated && !self::try116cache ) {
 124+ return false;
 125+ }
124126 $usedOptions = ParserOptions::legacyOptions();
125127 }
126128
@@ -150,6 +152,11 @@
151153 }
152154
153155 $value = $this->mMemc->get( $parserOutputKey );
 156+ if ( self::try116cache && !$value && strpos( $value, '*' ) !== -1 ) {
 157+ wfDebug( "New format parser cache miss.\n" );
 158+ $parserOutputKey = $this->getParserOutputKey( $article, $popts->optionsHash( ParserOptions::legacyOptions() ) );
 159+ $value = $this->mMemc->get( $parserOutputKey );
 160+ }
154161 if ( !$value ) {
155162 wfDebug( "Parser cache miss.\n" );
156163 wfIncrStats( "pcache_miss_absent" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r85354MFT r82518, r82530, r82538, r82547, r82550, r82565, r82572, r82608, r82696, r...demon18:25, 4 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81741Provisional workaround for parser cache interaction with r70783...brion15:02, 8 February 2011

Status & tagging log