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
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 12541)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 12542)
@@ -524,6 +524,8 @@
 $wgMessageCacheType = CACHE_ANYTHING;
 $wgParserCacheType = CACHE_ANYTHING;
 
+$wgParserCacheExpireTime = 86400;
+
 $wgSessionsInMemcached = false;
 $wgLinkCacheMemcached = false; # Not fully tested
 
Index: trunk/phase3/includes/ParserCache.php
===================================================================
--- trunk/phase3/includes/ParserCache.php	(revision 12541)
+++ trunk/phase3/includes/ParserCache.php	(revision 12542)
@@ -93,6 +93,7 @@
 	}
 
 	function save( $parserOutput, &$article, &$user ){
+                global $wgParserCacheExpireTime;
 		$key = $this->getKey( $article, $user );
 		$now = wfTimestampNow();
 		$parserOutput->setCacheTime( $now );
@@ -102,7 +103,7 @@
 		if( $parserOutput->containsOldMagic() ){
 			$expire = 3600; # 1 hour
 		} else {
-			$expire = 86400; # 1 day
+			$expire = $wgParserCacheExpireTime;
 		}
 		$this->mMemc->set( $key, $parserOutput, $expire );
 	}

Status & tagging log

  • 01:58, 13 October 2010 ^demon (Talk | contribs) changed the status of r12542 [removed: new added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox