MediaWiki r12542 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r12541‎ | r12542 (on ViewVC)‎ | r12543 >
Date:10:45, 9 January 2006
Author:midom
Status:old
Tags:
Comment:
move hardcoded ParserCache expire time to DefaultSettings.php, 1 day now
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -524,6 +524,8 @@
525525 $wgMessageCacheType = CACHE_ANYTHING;
526526 $wgParserCacheType = CACHE_ANYTHING;
527527
 528+$wgParserCacheExpireTime = 86400;
 529+
528530 $wgSessionsInMemcached = false;
529531 $wgLinkCacheMemcached = false; # Not fully tested
530532
Index: trunk/phase3/includes/ParserCache.php
@@ -93,6 +93,7 @@
9494 }
9595
9696 function save( $parserOutput, &$article, &$user ){
 97+ global $wgParserCacheExpireTime;
9798 $key = $this->getKey( $article, $user );
9899 $now = wfTimestampNow();
99100 $parserOutput->setCacheTime( $now );
@@ -102,7 +103,7 @@
103104 if( $parserOutput->containsOldMagic() ){
104105 $expire = 3600; # 1 hour
105106 } else {
106 - $expire = 86400; # 1 day
 107+ $expire = $wgParserCacheExpireTime;
107108 }
108109 $this->mMemc->set( $key, $parserOutput, $expire );
109110 }

Status & tagging log

  • 01:58, 13 October 2010 ^demon (talk | contribs) changed the status of r12542 [removed: new added: old]