Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/216882

Change subject: Avoid extra post-save parse that can sometimes occur
......................................................................

Avoid extra post-save parse that can sometimes occur

* Just avoid the purges in stableVersionUpdates() when they are
  already pointless, which also avoids this problem

Change-Id: I5c0ade287576358f389757ca4bde784a204e19ef
---
M backend/FlaggedRevs.class.php
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/82/216882/1

diff --git a/backend/FlaggedRevs.class.php b/backend/FlaggedRevs.class.php
old mode 100644
new mode 100755
index ff4c010..927ac78
--- a/backend/FlaggedRevs.class.php
+++ b/backend/FlaggedRevs.class.php
@@ -569,6 +569,7 @@
         * @param FlaggedRevision|null $oldSv, the old stable version (optional)
         * @param Object editInfo Article edit info about the current revision 
(optional)
         * @return bool stable version text/file changed and FR_INCLUDES_STABLE
+        * @throws Exception
         */
        public static function stableVersionUpdates(
                $page, $sv = null, $oldSv = null, $editInfo = null
@@ -618,9 +619,13 @@
                }
                # Lazily rebuild dependancies on next parse (we invalidate 
below)
                FlaggedRevs::clearStableOnlyDeps( $title->getArticleID() );
-               # Clear page cache
-               $title->invalidateCache();
-               self::purgeSquid( $title );
+               # Clear page cache unless this is hooked via 
ArticleEditUpdates, in
+               # which case these updates will happen already with tuned 
timestamps
+               if ( !$editInfo ) {
+                       $title->invalidateCache();
+                       self::purgeSquid( $title );
+               }
+
                return $changed;
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/216882
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c0ade287576358f389757ca4bde784a204e19ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to