"Parser options key expired, touched " . $article->getTouched()
. ", epoch $wgCacheEpoch, cached $cacheTime\n" );
return false;
- } elseif ( $optionsKey->isDifferentRevision( $article->getLatest() ) ) {
+ } elseif ( !$useOutdated && $optionsKey->isDifferentRevision( $article->getLatest() ) ) {
wfIncrStats( "pcache.miss.revid" );
$revId = $article->getLatest();
$cachedRevId = $optionsKey->getCacheRevisionId();
"ParserOutput key expired, touched $touched, "
. "epoch $wgCacheEpoch, cached $cacheTime\n" );
$value = false;
- } elseif ( $value->isDifferentRevision( $article->getLatest() ) ) {
+ } elseif ( !$useOutdated && $value->isDifferentRevision( $article->getLatest() ) ) {
wfIncrStats( "pcache.miss.revid" );
$revId = $article->getLatest();
$cachedRevId = $value->getCacheRevisionId();
*/
public function save( $parserOutput, $page, $popts, $cacheTime = null, $revId = null ) {
$expire = $parserOutput->getCacheExpiry();
- if ( $expire > 0 ) {
+ if ( $expire > 0 && !$this->mMemc instanceof EmptyBagOStuff ) {
$cacheTime = $cacheTime ?: wfTimestampNow();
if ( !$revId ) {
$revision = $page->getRevision();
'ParserCacheSaveComplete',
[ $this, $parserOutput, $page->getTitle(), $popts, $revId ]
);
- } else {
+ } elseif ( $expire <= 0 ) {
wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" );
}
}