A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Hooks/TitleSquidURLs below:

Manual:Hooks/TitleSquidURLs - MediaWiki

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": "MediaWiki\\Extension\\MyExtension\\Hooks::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.

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4