aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hooks.txt
diff options
context:
space:
mode:
authorTimo Tijhof <krinklemail@gmail.com>2020-04-16 21:44:35 +0100
committerDaniel Kinzler <dkinzler@wikimedia.org>2020-04-30 18:16:07 +0000
commit2f35c3ae677789aff3a6e18e62c362a903ca281c (patch)
tree047db799b93bc8f67ed3cdb1704efd31d8c5b4f2 /docs/hooks.txt
parent5938842a976a60e5bd7c6115d791d9f2ac40c19b (diff)
downloadmediawikicore-2f35c3ae677789aff3a6e18e62c362a903ca281c.tar.gz
mediawikicore-2f35c3ae677789aff3a6e18e62c362a903ca281c.zip
HtmlCacheUpdater: Add getUrls() method and support selective purging
* Move the Title::getCdnUrls() logic to the new HtmlCacheUpdater service. * Introduce a runtime option to decide whether this is for a direct revision or a cascading LinksUpdate. Bug: T250261 Change-Id: I514b9052761e0d949234996e97fdef255582df86
Diffstat (limited to 'docs/hooks.txt')
-rw-r--r--docs/hooks.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 3b0ded9da933..1a93cbe4110c 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -3529,6 +3529,23 @@ $title: Title object being checked against
$user: Current user object
&$whitelisted: Boolean value of whether this title is whitelisted
+'HtmlCacheUpdaterAppendUrls': Declare extra URLs to purge from HTTP caches.
+Use $mode to decide whether to gather all related URLs or only those affected by
+a re-render of the same content. For example, after a direct revision to the
+content the history page will need to be purged. However when re-rendering after
+a cascading change from a template, only URLs that render content need purging.
+The $mode will be either HtmlCacheUpdater::PURGE_URLS_LINKSUPDATE_ONLY or 0.
+$title: Title object for the page being purged.
+$mode: Integer.
+&$append: Append URLs relating to $title.
+
+'HtmlCacheUpdaterVaryUrls': Add variants of URLs to purge from HTTP caches.
+Extensions that provide site-wide variants of all URLs, such as by serving from
+an alternate domain or path, can use this hook to append alternative URLs for
+each url in $canonical.
+$urls: Canonical URLs.
+&$append: Append alternative URLs for $urls.
+
'TitleSquidURLs': Called to determine which URLs to purge from HTTP caches.
$title: Title object to purge
&$urls: An array of URLs to purge from the caches, to be manipulated.