From 26ff3e294620fa39785f3f7883dca5001740925b Mon Sep 17 00:00:00 2001 From: Ori Livneh Date: Thu, 27 Aug 2015 19:05:27 -0700 Subject: [PATCH] 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 --- includes/parser/Parser.php | 3 +++ 1 file changed, 3 insertions(+) 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 ) -- 2.20.1