From 1e2bc7321fe51d17fa25bd4682bc6d34c83936d0 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 2 Jun 2016 21:34:05 -0700 Subject: [PATCH] Avoid rollback and bot flagged edits in edit stash stats This just skews the numbers with cases that could not use the cache anyway. Bug: T136678 Change-Id: Iaa90d4f6ee80e886f59bc43a1392e59fe2a8f900 --- includes/page/WikiPage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index cf533d6e80..13e5f14d8b 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -1628,7 +1628,8 @@ class WikiPage implements Page, IDBAccessObject { } // Get the pre-save transform content and final parser output - $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialFormat ); + $useCache = !( $flags & EDIT_FORCE_BOT ); // avoid statsd noise (T136678) + $editInfo = $this->prepareContentForEdit( $content, null, $user, $serialFormat, $useCache ); $pstContent = $editInfo->pstContent; // Content object $meta = [ 'bot' => ( $flags & EDIT_FORCE_BOT ), -- 2.20.1