Expire pages with variable replacements after 1 hour, to prevent obsolete dates and article counts on eg main page
This commit is contained in:
parent
38e0048fe9
commit
574a71a9fc
1 changed files with 7 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue