If the ParserCache is disabled via $wgParserCacheType = CACHE_NONE,
don't bother trying to save anything because it won't do anything.
This also removes the misleading "Saved in parser cache" HTML comment
from the rendered output since it isn't being saved at all.
Change-Id: I5603d2b2866f0079cdcd837b1f1a4efc00bc8ed9
*/
public function save( $parserOutput, $page, $popts, $cacheTime = null, $revId = null ) {
$expire = $parserOutput->getCacheExpiry();
*/
public function save( $parserOutput, $page, $popts, $cacheTime = null, $revId = null ) {
$expire = $parserOutput->getCacheExpiry();
+ if ( $expire > 0 && !$this->mMemc instanceof EmptyBagOStuff ) {
$cacheTime = $cacheTime ?: wfTimestampNow();
if ( !$revId ) {
$revision = $page->getRevision();
$cacheTime = $cacheTime ?: wfTimestampNow();
if ( !$revId ) {
$revision = $page->getRevision();
'ParserCacheSaveComplete',
[ $this, $parserOutput, $page->getTitle(), $popts, $revId ]
);
'ParserCacheSaveComplete',
[ $this, $parserOutput, $page->getTitle(), $popts, $revId ]
);
+ } elseif ( $expire <= 0 ) {
wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" );
}
}
wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" );
}
}