[Mediawiki-l] How to use $wgCacheEpoch

Fernando Correia fernandoacorreia at gmail.com
Thu Nov 23 13:38:26 UTC 2006


I'm having problems setting a cache expiration date for the wiki.

I have this code on LocalSettings.php:

$cache_seconds = 30;  // Duration of the page cache in seconds
$cache_date = gmdate("YmdHis", mktime() - $cache_seconds);
$wgCacheEpoch = max($wgCacheEpoch, $cache_date);

Notice that I changed the format from the default "M d Y H:i:s" so it is
consistent with the format specified in the MediaWiki help.

That should keep pages on cache for 30 seconds. But the cache expires
immediately.

Is this a correct way to configure cache expiration?

Is there any timezone configuration that could be affecting this?

Thanks for any help you can give me.



More information about the MediaWiki-l mailing list