Avoid rollback and bot flagged edits in edit stash stats
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 3 Jun 2016 04:34:05 +0000 (21:34 -0700)
committerOri.livneh <ori@wikimedia.org>
Mon, 6 Jun 2016 18:52:43 +0000 (18:52 +0000)
This just skews the numbers with cases that could not use
the cache anyway.

Bug: T136678
Change-Id: Iaa90d4f6ee80e886f59bc43a1392e59fe2a8f900

includes/page/WikiPage.php

index cf533d6..13e5f14 100644 (file)
@@ -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 ),