r70817 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70816‎ | r70817 | r70818 >
Date:14:11, 10 August 2010
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Follow up r70783. Define variable used in debug message.

Provide the fallback prototype again, seems still used by extensions.
Modified paths:
  • /trunk/phase3/includes/parser/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/ParserCache.php
@@ -78,6 +78,11 @@
7979 public function getKey( $article, $popts, $useOutdated = true ) {
8080 global $wgCacheEpoch;
8181
 82+ if( $popts instanceof User ) {
 83+ wfDebug( "Use of outdated prototype ParserCache::getKey( &\$article, &\$user )\n" );
 84+ $popts = ParserOptions::newFromUser( $popts );
 85+ }
 86+
8287 // Determine the options which affect this article
8388 $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article ) );
8489 if ( $optionsKey != false ) {
@@ -135,6 +140,7 @@
136141
137142 if ( !$useOutdated && $value->expired( $touched ) ) {
138143 wfIncrStats( "pcache_miss_expired" );
 144+ $cacheTime = $value->getCacheTime();
139145 wfDebug( "ParserOutput key expired, touched $touched, epoch $wgCacheEpoch, cached $cacheTime\n" );
140146 $value = false;
141147 } else {

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

Comments

#Comment by Nikerabbit (talk | contribs)   15:12, 10 August 2010

Nobody's going to notice wfDebug. It should be at least wfWarn if not wfDeprecated.

#Comment by Platonides (talk | contribs)   19:34, 10 August 2010

I would have used wfDeprecated, but it's just for functions.

I have upgraded the warning to wfWarn in r70839.

Status & tagging log