r55657 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55656‎ | r55657 | r55658 >
Date:18:04, 28 August 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 19055) maintenance/rebuildrecentchanges.php now purges Special:Recentchanges's RSS and Atom feed cache
Purging cache timestamps should be sufficient since it won't allow cached versions to be used.
Also fix some errors in docs/memcached.txt.
Based on a patch by Jidanni - http://bug-attachment.wikimedia.org/attachment.cgi?id=6187
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/docs/memcached.txt (modified) (history)
  • /trunk/phase3/maintenance/rebuildrecentchanges.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/rebuildrecentchanges.php
@@ -37,6 +37,7 @@
3838 $this->rebuildRecentChangesTablePass2();
3939 $this->rebuildRecentChangesTablePass3();
4040 $this->rebuildRecentChangesTablePass4();
 41+ $this->purgeFeeds();
4142 $this->output( "Done.\n" );
4243 }
4344
@@ -272,6 +273,20 @@
273274
274275 $dbw->freeResult( $res );
275276 }
 277+
 278+ /**
 279+ * Purge cached feeds in $messageMemc
 280+ */
 281+ private function purgeFeeds() {
 282+ global $wgFeedClasses, $messageMemc;
 283+
 284+ $this->output( "Deleting feed timestamps.\n" );
 285+
 286+ foreach( $wgFeedClasses as $feed => $className ) {
 287+ $messageMemc->delete( wfMemcKey( 'rcfeed', $feed, 'timestamp' ) ); # Good enough for now.
 288+ }
 289+ }
 290+
276291 }
277292
278293 $maintClass = "RebuildRecentchanges";
Index: trunk/phase3/docs/memcached.txt
@@ -219,12 +219,15 @@
220220
221221 Special:Recentchanges (feed):
222222 stored in: $messageMemc
223 - key: $wgDBname:rcfeed:$format:limit:$imit:minor:$hideminor and
 223+ key: $wgDBname:rcfeed:$format:$limit:$hideminor:$target and
224224 rcfeed:$format:timestamp
225 - ex: wikidb:rcfeed:rss:limit:50:minor:0 and rcfeed:rss:timestamp
 225+ ex: wikidb:rcfeed:rss:50:: and rcfeed:rss:timestamp
226226 stores: xml output of feed
227227 expiry: one day
228 - clear by: calling Special:Recentchanges?action=purge
 228+ clear by: maintenance/rebuildrecentchanges.php script, or
 229+ calling Special:Recentchanges?action=purge&feed=rss,
 230+ Special:Recentchanges?action=purge&feed=atom,
 231+ but note need $wgGroupPermissions[...]['purge'] permission.
229232
230233 Statistics:
231234 controlled by: $wgStatsMethod
Index: trunk/phase3/RELEASE-NOTES
@@ -434,6 +434,8 @@
435435 Special:RevisionDelete are no more displayed when when doing log suppression
436436 * (bug 8143) Localised parser function names are now correctly case insensitive
437437 if they contain non-ASCII characters
 438+* (bug 19055) maintenance/rebuildrecentchanges.php now purges
 439+ Special:Recentchanges's RSS and Atom feed cache
438440
439441 == API changes in 1.16 ==
440442

Status & tagging log