Expire pages with variable replacements after 1 hour, to prevent obsolete dates and article counts on eg main page

This commit is contained in:
Brion Vibber 2003-09-05 21:12:24 +00:00
parent 38e0048fe9
commit 574a71a9fc

View file

@ -1063,8 +1063,14 @@ class Article {
function tryFileCache() {
if($this->isFileCacheable()) {
$touched = $this->mTouched;
if( strpos( $this->mContent, "{{" ) !== false ) {
# Expire pages with variable replacements in an hour
$expire = wfUnix2Timestamp( time() - 3600 );
$touched = max( $expire, $touched );
}
$cache = new CacheManager( $this->mTitle );
if($cache->isFileCacheGood( $this->mTouched )) {
if($cache->isFileCacheGood( $touched )) {
wfDebug( " tryFileCache() - about to load\n" );
$cache->loadFromFileCache();
exit;