* Setting mCacheTime to -1 is for old callers that
only check getCacheTime() instead of getCacheExpiry().
Most of them are already broken (WikiLog/SemanticForms) as
they check for -1 which is in fact never returned
due to the TS_MW conversion in Parser::getCacheTime.
* By using -1, the value of page_links_updated can end up
as 1969, which is confusing and broken.
Change-Id: I8809a4258eacff05992a2c27ade7f6a0c1731c51
if ( $this->mCacheExpiry === null || $this->mCacheExpiry > $seconds ) {
$this->mCacheExpiry = $seconds;
}
-
- // hack: set old-style marker for uncacheable entries.
- if ( $this->mCacheExpiry !== null && $this->mCacheExpiry <= 0 ) {
- $this->mCacheTime = -1;
- }
}
/**
throw new MWException( __METHOD__ .
" can only be called when actually parsing something" );
}
- $this->mOutput->setCacheTime( -1 ); // old style, for compatibility
$this->mOutput->updateCacheExpiry( 0 ); // new style, for consistency
}