From: jenkins-bot Date: Tue, 3 May 2016 01:59:57 +0000 (+0000) Subject: Merge "ParserCache: Don't try to save to nothing if disabled" X-Git-Tag: 1.31.0-rc.0~7120 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=3f7164062fd44959dbd76a89143f903f2ca78528;hp=6a4c5f37dce1c30c7c2964a09a18abe90866d34f;p=lhc%2Fweb%2Fwiklou.git Merge "ParserCache: Don't try to save to nothing if disabled" --- diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index 21486ff7aa..c6265a7ccd 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -262,7 +262,7 @@ class ParserCache { */ 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(); @@ -302,7 +302,7 @@ class ParserCache { 'ParserCacheSaveComplete', [ $this, $parserOutput, $page->getTitle(), $popts, $revId ] ); - } else { + } elseif ( $expire <= 0 ) { wfDebug( "Parser output was marked as uncacheable and has not been saved.\n" ); } }