From: Alexandre Emsenhuber Date: Fri, 28 Aug 2009 18:04:40 +0000 (+0000) Subject: * (bug 19055) maintenance/rebuildrecentchanges.php now purges Special:Recentchanges... X-Git-Tag: 1.31.0-rc.0~40012 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=6649743e0bb81e9f22771687acdbd657bac6c4ff;p=lhc%2Fweb%2Fwiklou.git * (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 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 62995f3d8b..166b51680b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/docs/memcached.txt b/docs/memcached.txt index 632511f32a..da6add66f2 100644 --- a/docs/memcached.txt +++ b/docs/memcached.txt @@ -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 diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index be707a7d71..4bfb08a73b 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -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";