r78393 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78392‎ | r78393 | r78394 >
Date:17:49, 14 December 2010
Author:platonides
Status:ok
Tags:
Comment:
Do not access to mTouched internals of Article from a different module per r70783#c12039
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1002,7 +1002,6 @@
10031003 # Run the parse, protected by a pool counter
10041004 wfDebug( __METHOD__ . ": doing uncached parse\n" );
10051005
1006 - $this->checkTouched();
10071006 $key = $parserCache->getKey( $this, $parserOptions );
10081007 $poolArticleView = new PoolWorkArticleView( $this, $key, $useParserCache, $parserOptions );
10091008
Index: trunk/phase3/includes/parser/ParserCache.php
@@ -66,7 +66,7 @@
6767 function getETag( $article, $popts ) {
6868 return 'W/"' . $this->getParserOutputKey( $article,
6969 $popts->optionsHash( ParserOptions::legacyOptions() ) ) .
70 - "--" . $article->mTouched . '"';
 70+ "--" . $article->getTouched() . '"';
7171 }
7272
7373 /**
@@ -95,10 +95,10 @@
9696 // Determine the options which affect this article
9797 $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) );
9898 if ( $optionsKey != false ) {
99 - if ( !$useOutdated && $optionsKey->expired( $article->mTouched ) ) {
 99+ if ( !$useOutdated && $optionsKey->expired( $article->getTouched() ) ) {
100100 wfIncrStats( "pcache_miss_expired" );
101101 $cacheTime = $optionsKey->getCacheTime();
102 - wfDebug( "Parser options key expired, touched {$article->mTouched}, epoch $wgCacheEpoch, cached $cacheTime\n" );
 102+ wfDebug( "Parser options key expired, touched " . $article->getTouched() . ", epoch $wgCacheEpoch, cached $cacheTime\n" );
103103 return false;
104104 }
105105
@@ -128,8 +128,7 @@
129129 return false;
130130 }
131131
132 - // Having called checkTouched() ensures this will be loaded
133 - $touched = $article->mTouched;
 132+ $touched = $article->getTouched();
134133
135134 $parserOutputKey = $this->getKey( $article, $popts, $useOutdated );
136135 if ( $parserOutputKey === false ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r79115This precondition is no longer needed after r78393platonides18:15, 28 December 2010
r79129MFT r78011 r78014 r78015 r78016 r78099 r78117 r78161 r78170 r78172 r78199 r78......platonides19:58, 28 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70783Use only the page relevant pieces in the parser cache key. Eg. two users with...platonides21:53, 9 August 2010

Status & tagging log