From: Aaron Schulz Date: Thu, 24 Aug 2017 22:10:19 +0000 (-0700) Subject: Disable rebound CDN purges for backlinks in HTMLCacheUpdateJob X-Git-Tag: 1.31.0-rc.0~2306^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/%7B%7B%20url_for%28%27vote%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=6898d06f8fec29a6b1f0a5957d860c0675c57985;p=lhc%2Fweb%2Fwiklou.git Disable rebound CDN purges for backlinks in HTMLCacheUpdateJob These are there to handle regeneration race conditions due to replication lag. If there happens to already be a huge amount of purges, the cost of this can be too high. Also, if the queue is backlogged, then it is already delayed, so extra delayed jobs do not help and just add to the backlog in that scenario. Bug: T173710 Change-Id: Ida0bf44233072e1356a9fe63866d522e4bb2d0ca --- diff --git a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php index 07d68e76f5..9d0f87cc11 100644 --- a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php +++ b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php @@ -139,9 +139,13 @@ class HTMLCacheUpdateJob extends Job { __METHOD__ ) ); - // Update CDN - $u = CdnCacheUpdate::newFromTitles( $titleArray ); - $u->doUpdate(); + // Update CDN; call purge() directly so as to not bother with secondary purges + $urls = []; + foreach ( $titleArray as $title ) { + /** @var Title $title */ + $urls = array_merge( $urls, $title->getCdnUrls() ); + } + CdnCacheUpdate::purge( $urls ); // Update file cache if ( $wgUseFileCache ) {