HTMLCacheUpdateJob: Enable PURGE_URLS_LINKSUPDATE_ONLY to reduce purges
* Pass $flags down from purgeTitleUrls() to getUrls(). * Avoid purging of action=history URLs (and its mobile variant, if MobileFrontend is installed) when the purge is only for a recursive LinksUpdate. Bug: T250261 Change-Id: I1a05ae028b9b44ec8d66211f94e64c7e3f48d6ff
This commit is contained in:
parent
2f35c3ae67
commit
3a69f9bb29
2 changed files with 6 additions and 3 deletions
2
includes/cache/HtmlCacheUpdater.php
vendored
2
includes/cache/HtmlCacheUpdater.php
vendored
|
|
@ -130,7 +130,7 @@ class HtmlCacheUpdater {
|
|||
$urls = [];
|
||||
foreach ( $titles as $title ) {
|
||||
/** @var Title $title */
|
||||
$urls = array_merge( $urls, $title->getCdnUrls() );
|
||||
$urls = array_merge( $urls, $this->getUrls( $title, $flags ) );
|
||||
}
|
||||
$this->purgeUrls( $urls, $flags );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,8 +158,11 @@ class HTMLCacheUpdateJob extends Job {
|
|||
) );
|
||||
|
||||
// Update CDN and file caches (avoiding secondary purge overhead)
|
||||
$hcu = MediaWikiServices::getInstance()->getHtmlCacheUpdater();
|
||||
$hcu->purgeTitleUrls( $titleArray, $hcu::PURGE_NAIVE );
|
||||
$htmlCache = MediaWikiServices::getInstance()->getHtmlCacheUpdater();
|
||||
$htmlCache->purgeTitleUrls(
|
||||
$titleArray,
|
||||
$htmlCache::PURGE_NAIVE | $htmlCache::PURGE_URLS_LINKSUPDATE_ONLY
|
||||
);
|
||||
}
|
||||
|
||||
public function getDeduplicationInfo() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue