From ec8665002aabf67f91c5a3dfbcf6be9240520dbd Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 15 Apr 2012 20:00:42 +0000 Subject: [PATCH] Purge the cached value from memcached. This fixes issues such as the one reported in http://thread.gmane.org/gmane.science.linguistics.wikipedia.technical/60769 That thread is about negative results (added in r98109), but the memcached caching layer had been there since the conception of interwiki table in r1589 (3002e1d). --- Interwiki_body.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Interwiki_body.php b/Interwiki_body.php index 0d7e4982..1d4b5751 100644 --- a/Interwiki_body.php +++ b/Interwiki_body.php @@ -167,7 +167,7 @@ class SpecialInterwiki extends SpecialPage { } function doSubmit() { - global $wgContLang; + global $wgContLang, $wgMemc; $request = $this->getRequest(); $prefix = $request->getVal( 'wpInterwikiPrefix' ); @@ -192,6 +192,7 @@ class SpecialInterwiki extends SpecialPage { $this->getOutput()->addWikiMsg( 'interwiki_deleted', $prefix ); $log = new LogPage( 'interwiki' ); $log->addEntry( 'iw_delete', $selfTitle, $reason, array( $prefix ) ); + $wgMemc->delete( wfMemcKey( 'interwiki', $prefix ) ); } break; case 'add': @@ -226,6 +227,7 @@ class SpecialInterwiki extends SpecialPage { $this->getOutput()->addWikiMsg( "interwiki_{$do}ed", $prefix ); $log = new LogPage( 'interwiki' ); $log->addEntry( 'iw_' . $do, $selfTitle, $reason, array( $prefix, $theurl, $trans, $local ) ); + $wgMemc->delete( wfMemcKey( 'interwiki', $prefix ) ); } break; }