MediaWiki 1.41.2
CdnCacheUpdate Class Reference

Handles purging the appropriate CDN objects given a list of URLs or Title instances. More...

Inherits DeferrableUpdate, and MergeableUpdate.

Collaboration diagram for CdnCacheUpdate:

Public Member Functions

 __construct (array $targets, array $options=[])
 
 doUpdate ()
 Perform the actual work.
 
 getUrls ()
 
 merge (MergeableUpdate $update)
 Merge this enqueued update with a new MergeableUpdate of the same qualified class name.
 

Static Public Member Functions

static purge (array $urls)
 Purges a list of CDN nodes defined in $wgCdnServers.
 

Detailed Description

Handles purging the appropriate CDN objects given a list of URLs or Title instances.

Definition at line 31 of file CdnCacheUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

CdnCacheUpdate::__construct ( array $targets,
array $options = [] )
Parameters
string[] | PageReference[]$targetsCollection of URLs/titles to be purged from CDN
array$optionsOptions map. Supports:
  • reboundDelay: how many seconds after the first purge to send a rebound purge. No rebound purge will be sent if this is not positive. [Default: 0]

Definition at line 46 of file CdnCacheUpdate.php.

Member Function Documentation

◆ doUpdate()

CdnCacheUpdate::doUpdate ( )

Perform the actual work.

Implements DeferrableUpdate.

Definition at line 70 of file CdnCacheUpdate.php.

References purge().

◆ getUrls()

CdnCacheUpdate::getUrls ( )
Returns
string[] List of URLs

Definition at line 145 of file CdnCacheUpdate.php.

◆ merge()

CdnCacheUpdate::merge ( MergeableUpdate $update)

Merge this enqueued update with a new MergeableUpdate of the same qualified class name.

Parameters
MergeableUpdate$updateThe new update (having the same class)

Implements MergeableUpdate.

Definition at line 61 of file CdnCacheUpdate.php.

◆ purge()

static CdnCacheUpdate::purge ( array $urls)
static

Purges a list of CDN nodes defined in $wgCdnServers.

$urlArr should contain the full URLs to purge as values (example: $urlArr[] = 'http://my.host/something')

Parameters
string[]$urlsList of full URLs to purge

Definition at line 103 of file CdnCacheUpdate.php.

References wfDebugLog().

Referenced by doUpdate(), and CdnPurgeJob\run().


The documentation for this class was generated from the following file: