< Manual:Hooks
| TitleSquidURLs | |
|---|---|
| Available from version 1.22.0 (Gerrit change 64290) Allows adding to/modifying the list of URLs to purge when a title is purged | |
| Define function: | public static function onTitleSquidURLs( Title $title, array &$urls ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"TitleSquidURLs": "MyExtensionHooks::onTitleSquidURLs"
}
}
|
| Called from: | File(s): Title.php |
| Interface: | TitleSquidURLsHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:TitleSquidURLs extensions.
Details
This provides more fine-grained control over purging of pages cached by an HTTP accelerator such Varnish or Squid. Normally, when the cache is purged, the internal URL is purged ($title->getInternalURL()), as well as the action=history variant of that. This allows a hook listener to change (usually, add to), the list of affected URLs, if additional URLs depend on the content of a title.
See also
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.