Merge "HTMLCacheUpdateJob: Enable PURGE_URLS_LINKSUPDATE_ONLY to reduce purges"

This commit is contained in:
jenkins-bot 2020-04-30 18:44:15 +00:00 committed by Gerrit Code Review
commit bb1ada6e17
2 changed files with 6 additions and 3 deletions

View file

@ -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 );
}

View file

@ -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() {