MediaWiki  master
Go to the documentation of this file.
1 <?php
27 class CdnPurgeJob extends Job implements GenericParameterJob {
28  public function __construct( array $params ) {
29  parent::__construct( 'cdnPurge', $params );
30  $this->removeDuplicates = false; // delay semantics are critical
31  }
33  public function run() {
34  // Use purge() directly to avoid infinite recursion
35  CdnCacheUpdate::purge( $this->params['urls'] );
37  return true;
38  }
39 }
static purge(array $urls)
Purges a list of CDN nodes defined in $wgCdnServers.
Job to purge a set of URLs from CDN.
Definition: CdnPurgeJob.php:27
Run the job.
Definition: CdnPurgeJob.php:33
__construct(array $params)
Definition: CdnPurgeJob.php:28
Class to both describe a background job and handle jobs.
Definition: Job.php:39
array $params
Array of job parameters.
Definition: Job.php:44
Interface for generic jobs only uses the parameters field and are JSON serializable.