r3766 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r3765‎ | r3766 | r3767 >
Date:08:18, 30 May 2004
Author:timstarling
Status:old
Tags:
Comment:
Extra debugging info and a typo fix
Modified paths:
  • /trunk/phase3/includes/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ParserCache.php
@@ -18,11 +18,15 @@
1919 $hash = $user->getPageRenderingHash();
2020 $pageid = intval( $article->getID() );
2121 $key = $this->getKey( $article, $user );
 22+ wfDebug( "Trying parser cache $key\n" );
2223 $value = $wgMemc->get( $key );
2324 if ( $value ) {
 25+ wfDebug( "Found.\n" );
2426 # Delete if article has changed since the cache was made
2527 $touched = $article->getTouched();
26 - if ( $value->getCacheTime() <= $touched || $value->getCacheTime < $wgCacheEpoch ) {
 28+ $cacheTime = $value->getCacheTime();
 29+ if ( $value->getCacheTime() <= $touched || $cacheTime < $wgCacheEpoch ) {
 30+ wfDebug( "Key expired, touched $touched, epoch $wgCacheEpoch, cached $cacheTime\n" );
2731 $wgMemc->delete( $key );
2832 $value = false;
2933 }

Status & tagging log