MediaWiki master
|
Handles purging the appropriate CDN objects given a list of URLs or Title instances. More...
Inherits MediaWiki\Deferred\DeferrableUpdate, and MediaWiki\Deferred\MergeableUpdate.
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. | |
Handles purging the appropriate CDN objects given a list of URLs or Title instances.
Definition at line 37 of file CdnCacheUpdate.php.
MediaWiki\Deferred\CdnCacheUpdate::__construct | ( | array | $targets, |
array | $options = [] ) |
string[] | PageReference[] | $targets | Collection of URLs/titles to be purged from CDN |
array | $options | Options map. Supports:
|
Definition at line 52 of file CdnCacheUpdate.php.
MediaWiki\Deferred\CdnCacheUpdate::doUpdate | ( | ) |
Perform the actual work.
Implements MediaWiki\Deferred\DeferrableUpdate.
Definition at line 76 of file CdnCacheUpdate.php.
References $url, MediaWiki\MediaWikiServices\getInstance(), and MediaWiki\Deferred\CdnCacheUpdate\purge().
MediaWiki\Deferred\CdnCacheUpdate::getUrls | ( | ) |
Definition at line 151 of file CdnCacheUpdate.php.
MediaWiki\Deferred\CdnCacheUpdate::merge | ( | MergeableUpdate | $update | ) |
Merge this enqueued update with a new MergeableUpdate of the same qualified class name.
MergeableUpdate | $update | The new update (having the same class) |
Implements MediaWiki\Deferred\MergeableUpdate.
Definition at line 67 of file CdnCacheUpdate.php.
|
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')
string[] | $urls | List of full URLs to purge |
Definition at line 109 of file CdnCacheUpdate.php.
References $url, MediaWiki\MainConfigNames\CdnServers, MediaWiki\MediaWikiServices\getInstance(), MediaWiki\MainConfigNames\HTCPRouting, and wfDebugLog().
Referenced by MediaWiki\Deferred\CdnCacheUpdate\doUpdate().