MediaWiki REL1_32
CdnPurgeJob.php
Go to the documentation of this file.
1<?php
30class CdnPurgeJob extends Job {
35 function __construct( Title $title, array $params ) {
36 parent::__construct( 'cdnPurge', $title, $params );
37 $this->removeDuplicates = false; // delay semantics are critical
38 }
39
40 public function run() {
41 // Use purge() directly to avoid infinite recursion
42 CdnCacheUpdate::purge( $this->params['urls'] );
43
44 return true;
45 }
46}
static purge(array $urlArr)
Purges a list of CDN nodes defined in $wgSquidServers.
Job to purge a set of URLs from CDN.
__construct(Title $title, array $params)
run()
Run the job.
Class to both describe a background job and handle jobs.
Definition Job.php:30
array $params
Array of job parameters.
Definition Job.php:35
Represents a title within MediaWiki.
Definition Title.php:39
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))