Manuel:$wgHTCPRouting

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgHTCPRouting and the translation is 19% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎中文 • ‎日本語
Purge via HTCP multicanal: $wgHTCPRouting
Routing configuration for HTCP multicast purging.
Introduit dans la version :1.22.0
Retiré dans la version :Encore utilisé
Valeurs autorisées :(array)
Valeur par défaut :[]
Autres paramètres : Alphabétique | Par Fonction

Détails

Routing configuration for HTCP multicast purging.

Add elements here to enable HTCP and determine which purges are sent where. If set to an empty array, HTCP is disabled.

Each key in this array is a regular expression to match against the purged URL, or an empty string to match all URLs. The purged URL is matched against the regexes in the order specified, and the first rule whose regex matches is used.

This variable was introduced in MediaWiki 1.20.0 as $wgHTCPMulticastRouting. It was renamed in 1.22; the old variable is still recognized by being copied to the new one in includes/Setup.php but should be treated as deprecated:

// $wgHTCPMulticastRouting got renamed to $wgHTCPRouting in MediaWiki 1.22 ensure back compatibility.
if ( !$wgHTCPRouting && $wgHTCPMulticastRouting ) {
        $wgHTCPRouting = $wgHTCPMulticastRouting;
}

// Initialize $wgHTCPRouting from backwards-compatible settings that comes from pre 1.20 version.
if ( !$wgHTCPRouting && $wgHTCPMulticastAddress ) {
        $wgHTCPRouting = array(
                '' => array(
                        'host' => $wgHTCPMulticastAddress,
                        'port' => $wgHTCPPort,
                )
        );
}

Note Note : If using this variable with varnish, you need a converter program like vhtcpd

Exemple

Example configuration to send purges for upload.wikimedia.org to one multicast group and all other purges to another:

$wgHTCPRouting = array(
    '|^https?://upload\.wikimedia\.org|' => array(
        'host' => '239.128.0.113',
        'port' => 4827,
    ),
    '' => array(
        'host' => '239.128.0.112',
        'port' => 4827,
    ),
);