From 8613886134f37c157e64542ec57890f5f5cb6411 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Mon, 9 Jan 2006 10:45:47 +0000 Subject: [PATCH] move hardcoded ParserCache expire time to DefaultSettings.php, 1 day now --- includes/DefaultSettings.php | 2 ++ includes/ParserCache.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 ); } -- 2.20.1