move hardcoded ParserCache expire time to DefaultSettings.php, 1 day now
authorDomas Mituzas <midom@users.mediawiki.org>
Mon, 9 Jan 2006 10:45:47 +0000 (10:45 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Mon, 9 Jan 2006 10:45:47 +0000 (10:45 +0000)
includes/DefaultSettings.php
includes/ParserCache.php

index e1b1b22..834bbee 100644 (file)
@@ -524,6 +524,8 @@ $wgMainCacheType = CACHE_NONE;
 $wgMessageCacheType = CACHE_ANYTHING;
 $wgParserCacheType = CACHE_ANYTHING;
 
+$wgParserCacheExpireTime = 86400;
+
 $wgSessionsInMemcached = false;
 $wgLinkCacheMemcached = false; # Not fully tested
 
index fbe6b91..aa3194e 100644 (file)
@@ -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 );
        }