| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Cache\Hook; |
| 4 | |
| 5 | /** |
| 6 | * This is a hook handler interface, see docs/Hooks.md. |
| 7 | * Use the hook name "HtmlCacheUpdaterVaryUrls" to register handlers implementing this interface. |
| 8 | * |
| 9 | * @stable to implement |
| 10 | * @ingroup Hooks |
| 11 | */ |
| 12 | interface HtmlCacheUpdaterVaryUrlsHook { |
| 13 | /** |
| 14 | * This hook is used to add variants of URLs to purge from HTTP caches. |
| 15 | * |
| 16 | * Extensions that provide site-wide variants of all URLs, such as by serving from an |
| 17 | * alternate domain or path, can use this hook to append alternative URLs for each url in |
| 18 | * $urls. |
| 19 | * |
| 20 | * @since 1.35 |
| 21 | * |
| 22 | * @param array $urls Canonical URLs |
| 23 | * @param array &$append Append alternative URLs for $urls |
| 24 | * @return bool|void True or no return value to continue or false to abort |
| 25 | */ |
| 26 | public function onHtmlCacheUpdaterVaryUrls( $urls, &$append ); |
| 27 | } |