* (bug 19055) maintenance/rebuildrecentchanges.php now purges Special:Recentchanges...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 28 Aug 2009 18:04:40 +0000 (18:04 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 28 Aug 2009 18:04:40 +0000 (18:04 +0000)
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

RELEASE-NOTES
docs/memcached.txt
maintenance/rebuildrecentchanges.php

index 62995f3..166b516 100644 (file)
@@ -434,6 +434,8 @@ this. Was used when mwEmbed was going to be an extension.
   Special:RevisionDelete are no more displayed when when doing log suppression
 * (bug 8143) Localised parser function names are now correctly case insensitive
   if they contain non-ASCII characters
+* (bug 19055) maintenance/rebuildrecentchanges.php now purges
+  Special:Recentchanges's RSS and Atom feed cache
 
 == API changes in 1.16 ==
 
index 632511f..da6add6 100644 (file)
@@ -219,12 +219,15 @@ Special:Allpages:
 
 Special:Recentchanges (feed):
        stored in: $messageMemc
-       key: $wgDBname:rcfeed:$format:limit:$imit:minor:$hideminor and
+       key: $wgDBname:rcfeed:$format:$limit:$hideminor:$target and
                rcfeed:$format:timestamp
-       ex: wikidb:rcfeed:rss:limit:50:minor:0 and rcfeed:rss:timestamp
+       ex: wikidb:rcfeed:rss:50:: and rcfeed:rss:timestamp
        stores: xml output of feed
        expiry: one day
-       clear by: calling Special:Recentchanges?action=purge
+       clear by: maintenance/rebuildrecentchanges.php script, or
+       calling Special:Recentchanges?action=purge&feed=rss,
+       Special:Recentchanges?action=purge&feed=atom,
+       but note need $wgGroupPermissions[...]['purge'] permission.
 
 Statistics:
        controlled by: $wgStatsMethod
index be707a7..4bfb08a 100644 (file)
@@ -37,6 +37,7 @@ class RebuildRecentchanges extends Maintenance {
                $this->rebuildRecentChangesTablePass2();
                $this->rebuildRecentChangesTablePass3();
                $this->rebuildRecentChangesTablePass4();
+               $this->purgeFeeds();
                $this->output( "Done.\n" );
        }
 
@@ -272,6 +273,20 @@ class RebuildRecentchanges extends Maintenance {
        
                $dbw->freeResult( $res );
        }
+
+       /**
+        * Purge cached feeds in $messageMemc
+        */
+       private function purgeFeeds() {
+               global $wgFeedClasses, $messageMemc;
+
+               $this->output( "Deleting feed timestamps.\n" );
+
+               foreach( $wgFeedClasses as $feed => $className ) {
+                       $messageMemc->delete( wfMemcKey( 'rcfeed', $feed, 'timestamp' ) ); # Good enough for now.
+               }
+       }
+
 }
 
 $maintClass = "RebuildRecentchanges";