Page MenuHomePhabricator

rebuildrecentchanges.php must purge RSS and Atom feeds
Closed, ResolvedPublic


rebuildrecentchanges.php forgets to purge RSS and Atom feeds, meaning feed users will still get old drivel. This patch purges the feeds, and also fixes docs/memcached.txt. Actually I don't purge the

Version: 1.16.x
Severity: normal

attachment rebuildrecentchangesFEED.txt ignored as obsolete



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:40 PM
bzimport set Reference to bz19055.
bzimport added a subscriber: Unknown Object (MLST).

Actually I don't purge the feeds, as I don't know how to easily match
the many $wgDBname:rcfeed:*:*:*: combinations that might be present in
the cache. However I found that just deleting the timestamps works good
enough for now.

Rather than building the key manually, why not just use wfMemcKey()?

Created attachment 6187
Now use wfMemcKey. Wish there was a wildcard...


You shouldn't be adding to the key manually by appending :keypart, etc. Pass all the parts of the key to wfMemcKey() in an array.

Instead of:

wfMemcKey( array( 'rcfeed', $feed, 'timestamp' )

Not only does using
$messageMemc->delete(wfMemcKey( array( 'rcfeed', $feed, 'timestamp' )));
not help in deleting
keyname: radioscanningtw:rcfeed:atom:50::
keyname: radioscanningtw:rcfeed:rss:2::
keyname: radioscanningtw:rcfeed:rss:4::
but it doesn't even delete
keyname: radioscanningtw:rcfeed:rss:timestamp
So, sorry.

What I need is a utility function, like UNIX rm -r, which will expand
to all rcfeed:* matches, no matter how many trailing colons. That way
I need not leave any of these now useless strings wastefully behind
there in the database, for months too in the case of quiet wikis. By
the way

public static function checkPurge( $timekey, $key )

could make use of such a function too, as it also leaves some things
wastefully behind. Such a function should reside in the same file the
rest of those mem* functions do.