r114912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114911‎ | r114912 | r114913 >
Date:20:00, 15 April 2012
Author:platonides
Status:ok
Tags:
Comment:
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).
Modified paths:
  • /trunk/extensions/Interwiki/Interwiki_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Interwiki/Interwiki_body.php
@@ -167,7 +167,7 @@
168168 }
169169
170170 function doSubmit() {
171 - global $wgContLang;
 171+ global $wgContLang, $wgMemc;
172172
173173 $request = $this->getRequest();
174174 $prefix = $request->getVal( 'wpInterwikiPrefix' );
@@ -192,6 +192,7 @@
193193 $this->getOutput()->addWikiMsg( 'interwiki_deleted', $prefix );
194194 $log = new LogPage( 'interwiki' );
195195 $log->addEntry( 'iw_delete', $selfTitle, $reason, array( $prefix ) );
 196+ $wgMemc->delete( wfMemcKey( 'interwiki', $prefix ) );
196197 }
197198 break;
198199 case 'add':
@@ -226,6 +227,7 @@
227228 $this->getOutput()->addWikiMsg( "interwiki_{$do}ed", $prefix );
228229 $log = new LogPage( 'interwiki' );
229230 $log->addEntry( 'iw_' . $do, $selfTitle, $reason, array( $prefix, $theurl, $trans, $local ) );
 231+ $wgMemc->delete( wfMemcKey( 'interwiki', $prefix ) );
230232 }
231233 break;
232234 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r114913upd version number to 2.1wikinaut20:30, 15 April 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r1589Move interwiki management from big ugly array into the database, with...vibber11:20, 21 August 2003
r98109Cache negative results for interwiki prefix checks. Also helps filecache fail...aaron03:37, 26 September 2011

Status & tagging log