MediaWiki master
CdnPurgeJob.php
Go to the documentation of this file.
1<?php
22
29class CdnPurgeJob extends Job implements GenericParameterJob {
30 public function __construct( array $params ) {
31 parent::__construct( 'cdnPurge', $params );
32 $this->removeDuplicates = false; // delay semantics are critical
33 }
34
35 public function run() {
36 // Use purge() directly to avoid infinite recursion
37 CdnCacheUpdate::purge( $this->params['urls'] );
38
39 return true;
40 }
41}
array $params
The job parameters.
Job to purge a set of URLs from CDN.
run()
Run the job.
__construct(array $params)
Describe and execute a background job.
Definition Job.php:41
Handles purging the appropriate CDN objects given a list of URLs or Title instances.
Interface for generic jobs only uses the parameters field and are JSON serializable.