From: Tim Starling Date: Sat, 9 Feb 2008 10:01:35 +0000 (+0000) Subject: Reset the message cache on action=purge of a MediaWiki namespace page. Delete the... X-Git-Tag: 1.31.0-rc.0~49551 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=97522367b236ec55d72cd4a76d2f6c1ddabe92ec;p=lhc%2Fweb%2Fwiklou.git Reset the message cache on action=purge of a MediaWiki namespace page. Delete the sidebar cache *after* the message cache is updated, not before. If you delete it before then the same version might get cached again. --- diff --git a/includes/Article.php b/includes/Article.php index 3f17c01e4c..188aee1ed5 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -978,6 +978,11 @@ class Article { $update = SquidUpdate::newSimplePurge( $this->mTitle ); $update->doUpdate(); } + if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { + global $wgMessageCache; + $text = $this->getContent(); + $wgMessageCache->replace( $this->mTitle->getDBkey(), $text ); + } $this->view(); } diff --git a/includes/MessageCache.php b/includes/MessageCache.php index 743bd7f18b..976cd968f6 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -348,7 +348,6 @@ class MessageCache { wfProfileIn( __METHOD__ ); $this->lock(); $this->load(); - $parserMemc->delete(wfMemcKey('sidebar')); if ( is_array( $this->mCache ) ) { if ( $text === false ) { # Article was deleted @@ -376,6 +375,7 @@ class MessageCache { } } $this->unlock(); + $parserMemc->delete(wfMemcKey('sidebar')); wfProfileOut( __METHOD__ ); }