https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114912

Revision: 114912
Author:   platonides
Date:     2012-04-15 20:00:42 +0000 (Sun, 15 Apr 2012)
Log Message:
-----------
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: trunk/extensions/Interwiki/Interwiki_body.php
===================================================================
--- trunk/extensions/Interwiki/Interwiki_body.php       2012-04-15 12:27:50 UTC 
(rev 114911)
+++ trunk/extensions/Interwiki/Interwiki_body.php       2012-04-15 20:00:42 UTC 
(rev 114912)
@@ -167,7 +167,7 @@
        }
 
        function doSubmit() {
-               global $wgContLang;
+               global $wgContLang, $wgMemc;
 
                $request = $this->getRequest();
                $prefix = $request->getVal( 'wpInterwikiPrefix' );
@@ -192,6 +192,7 @@
                                $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 @@
                                $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;
                }       


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

Reply via email to