r3740 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r3739‎ | r3740 | r3741 >
Date:11:39, 29 May 2004
Author:timstarling
Status:old
Tags:
Comment:
Parser cache respects $wgCacheEpoch
Modified paths:
  • /trunk/phase3/includes/ParserCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ParserCache.php
@@ -9,9 +9,9 @@
1010 $key = "$wgDBname:pcache:idhash:$pageid-$hash";
1111 return $key;
1212 }
13 -
 13+
1414 function get( &$article, &$user ) {
15 - global $wgMemc;
 15+ global $wgMemc, $wgCacheEpoch;
1616 $fname = "ParserCache::get";
1717 wfProfileIn( $fname );
1818
@@ -21,7 +21,8 @@
2222 $value = $wgMemc->get( $key );
2323 if ( $value ) {
2424 # Delete if article has changed since the cache was made
25 - if ( $value->getTouched() != $article->getTouched() ) {
 25+ $touched = $article->getTouched();
 26+ if ( $value->getTouched() != $touched || $touched > $wgCacheEpoch ) {
2627 $wgMemc->delete( $key );
2728 $value = false;
2829 }

Status & tagging log