$wgHTCPMulticastRouting rename + multi hosts support
This patch does two things:
A) rename $wgHTCPMulticastRouting to $wgHTCPRouting since you can have
MediaWiki send purge packets over unicast.
B) add support for multi hosts purge in the few cases one want to split
the multicast groups per cache role but still want to purge more than
one cache group.
A) rename
The rename adds deprecation notices in the comments and adds a back
compatibility layer in the case someone is already using this feature.
Given Wikimedia Foundation is not even using it, it is very unlikely,
but yet: better safe than sorry.
My logic is flawed sometime, so that needs a bit of review :) There is
two levels of deprecations to watch for:
- pre mw1.20 which useds $wgHTCPMulticastAddress and
$wgHTCPMulticastPort
- pre mw1.22 (aka before this patch) that used $wgHTCPMulticastRouting
The resulting configuration should be properly loaded in $wgHTCPRouting.
B) multi hosts
The HTCP routing let you split purges to different hosts according to
the URL. In some case, we want to be able to purge an URL from more
than one multicast group. A Wikimedia example would be to send text
related purges to the text and mobiles caches while upload purges are
sent to the upload caches.
An abstracted example would be:
$wgHTCPRouting = array(
// upload URLs to upload caches
'/(upload|thumbs)/' => array(
'host' => '<ip for upload caches>'
),
// Everything else to text & mobile
'' => array(
array( 'host' => '<ip for text caches>' ),
array( 'host' => '<ip for mobile caches>' ),
),
);
Change-Id: Ie87f6b81007f47f9cb439371743f3ad9a4b0c774