From: Domas Mituzas Date: Mon, 9 Jan 2006 10:45:47 +0000 (+0000) Subject: move hardcoded ParserCache expire time to DefaultSettings.php, 1 day now X-Git-Tag: 1.6.0~664 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=8613886134f37c157e64542ec57890f5f5cb6411;p=lhc%2Fweb%2Fwiklou.git move hardcoded ParserCache expire time to DefaultSettings.php, 1 day now --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e1b1b220e7..834bbee0ce 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -524,6 +524,8 @@ $wgMainCacheType = CACHE_NONE; $wgMessageCacheType = CACHE_ANYTHING; $wgParserCacheType = CACHE_ANYTHING; +$wgParserCacheExpireTime = 86400; + $wgSessionsInMemcached = false; $wgLinkCacheMemcached = false; # Not fully tested diff --git a/includes/ParserCache.php b/includes/ParserCache.php index fbe6b912f5..aa3194ee8c 100644 --- a/includes/ParserCache.php +++ b/includes/ParserCache.php @@ -93,6 +93,7 @@ class ParserCache { } function save( $parserOutput, &$article, &$user ){ + global $wgParserCacheExpireTime; $key = $this->getKey( $article, $user ); $now = wfTimestampNow(); $parserOutput->setCacheTime( $now ); @@ -102,7 +103,7 @@ class ParserCache { if( $parserOutput->containsOldMagic() ){ $expire = 3600; # 1 hour } else { - $expire = 86400; # 1 day + $expire = $wgParserCacheExpireTime; } $this->mMemc->set( $key, $parserOutput, $expire ); }