Chad has uploaded a new change for review.

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

Change subject: Purge pages with blank content
......................................................................

Purge pages with blank content

Change-Id: I1d7969a9d56218f1e06bc542436f4eb42bbfc9f2
---
M wmf-config/CommonSettings.php
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/90/246290/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index c7037ec..a99f77b 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -238,6 +238,17 @@
        return true;
 };
 
+// Temporary hack to purge squid for pages with empty page content. Follow-up
+// from site outage. -- Chad, 2015-10-14
+$wgHooks['RejectParserCacheValue'][] = function onRejectParserCacheValue(
+       ParserOutput $parserOutput, $page, ParserOptions $popts ) {
+               if ( !$parserOutput->getText() ) {
+                       $page->getTitle()->purgeSquid();
+                       return false;
+               }
+               return true;
+       }
+
 $wgFileStore['deleted']['directory'] = 
"/mnt/upload7/private/archive/$site/$lang";
 
 # used for mysql/search settings

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d7969a9d56218f1e06bc542436f4eb42bbfc9f2
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

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

Reply via email to