From: Ori Livneh Date: Fri, 28 Aug 2015 02:05:27 +0000 (-0700) Subject: Add ParserOutput cache and expiry times to NewPP report X-Git-Tag: 1.31.0-rc.0~10232^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=26ff3e294620fa39785f3f7883dca5001740925b;p=lhc%2Fweb%2Fwiklou.git Add ParserOutput cache and expiry times to NewPP report The labels are not localized, because I think this ought to be outputted as a JSON blob, with uniform field names. But not doing that in this patch. Change-Id: I235839b276632308ddeac7afe763d355b73c2a25 --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 9731a206bc..f538153197 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -509,6 +509,9 @@ class Parser { if ( $wgShowHostnames ) { $limitReport .= 'Parsed by ' . wfHostname() . "\n"; } + $limitReport .= 'Cached time: ' . $this->mOutput->getCacheTime() . "\n"; + $limitReport .= 'Cache expiry: ' . $this->mOutput->getCacheExpiry() . "\n"; + $limitReport .= 'Dyanmic content: ' . ( $this->mOutput->hasDynamicContent() ? 'true' : 'false' ) . "\n"; foreach ( $this->mOutput->getLimitReportData() as $key => $value ) { if ( Hooks::run( 'ParserLimitReportFormat', array( $key, &$value, &$limitReport, false, false )