Manual:Hooks/HtmlCacheUpdaterVaryUrls
HtmlCacheUpdaterVaryUrls | |
---|---|
Available from version 1.35.0 (Gerrit change 589421) This hook is used to add variants of URLs to purge from HTTP caches. | |
Define function: | public static function onHtmlCacheUpdaterVaryUrls( array $urls, array &$append ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"HtmlCacheUpdaterVaryUrls": "MediaWiki\\Extension\\MyExtension\\Hooks::onHtmlCacheUpdaterVaryUrls"
}
}
|
Called from: | File(s): cache/HtmlCacheUpdater.php Function(s): getUrls |
Interface: | HtmlCacheUpdaterVaryUrlsHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:HtmlCacheUpdaterVaryUrls extensions.
Parameters
edit$urls
: Anarray
of canonical URLs&$appendUrls
: A modifiablearray
to append alternative URLs for$urls