MediaWiki REL1_33
|
Handles purging appropriate CDN URLs given a title (or titles) More...
Public Member Functions | |
__construct (array $urlArr) | |
doUpdate () | |
Purges the list of URLs passed to the constructor. | |
merge (MergeableUpdate $update) | |
Merge this update with $update. | |
Static Public Member Functions | |
static | expand ( $url) |
Expand local URLs to fully-qualified URLs using the internal protocol and host defined in $wgInternalServer. | |
static | newFromTitles ( $titles, $urlArr=[]) |
Create an update object from an array of Title objects, or a TitleArray object. | |
static | purge (array $urlArr) |
Purges a list of CDN nodes defined in $wgSquidServers. | |
Protected Attributes | |
string[] | $urls = [] |
Collection of URLs to purge. | |
Static Private Member Functions | |
static | getRuleForURL ( $url, $rules) |
Find the HTCP routing rule to use for a given URL. | |
static | HTCPPurge (array $urlArr) |
Send Hyper Text Caching Protocol (HTCP) CLR requests. | |
Handles purging appropriate CDN URLs given a title (or titles)
Definition at line 30 of file CdnCacheUpdate.php.
CdnCacheUpdate::__construct | ( | array | $urlArr | ) |
string[] | $urlArr | Collection of URLs to purge |
Definition at line 37 of file CdnCacheUpdate.php.
References and().
CdnCacheUpdate::doUpdate | ( | ) |
Purges the list of URLs passed to the constructor.
Implements DeferrableUpdate.
Definition at line 68 of file CdnCacheUpdate.php.
References $wgCdnReboundPurgeDelay, NS_SPECIAL, and purge.
|
static |
Expand local URLs to fully-qualified URLs using the internal protocol and host defined in $wgInternalServer.
Input that's already fully- qualified will be passed through unchanged.
This is used to generate purge URLs that may be either local to the main wiki or include a non-native host, such as images hosted on a second internal server.
Client functions should not need to call this.
string | $url |
Definition at line 260 of file CdnCacheUpdate.php.
References PROTO_INTERNAL, and wfExpandUrl().
Referenced by HTCPPurge(), and SquidPurgeClient\queuePurge().
|
staticprivate |
Find the HTCP routing rule to use for a given URL.
string | $url | URL to match |
array | $rules | Array of rules, see $wgHTCPRouting for format and behavior |
Definition at line 270 of file CdnCacheUpdate.php.
References and().
Referenced by HTCPPurge().
|
staticprivate |
Send Hyper Text Caching Protocol (HTCP) CLR requests.
MWException |
string[] | $urlArr | Collection of URLs to purge |
Definition at line 159 of file CdnCacheUpdate.php.
References $wgHTCPMulticastTTL, $wgHTCPRouting, and(), expand(), getRuleForURL(), UIDGenerator\newSequentialPerNodeIDs(), UIDGenerator\QUICK_VOLATILE, and wfDebugLog().
Referenced by purge().
CdnCacheUpdate::merge | ( | MergeableUpdate | $update | ) |
Merge this update with $update.
MergeableUpdate | $update | Update of the same class type |
Implements MergeableUpdate.
Definition at line 41 of file CdnCacheUpdate.php.
References and().
|
static |
Create an update object from an array of Title objects, or a TitleArray object.
Traversable | Title[] | $titles | |
string[] | $urlArr |
Definition at line 55 of file CdnCacheUpdate.php.
|
static |
Purges a list of CDN nodes defined in $wgSquidServers.
$urlArr should contain the full URLs to purge as values (example: $urlArr[] = 'http://my.host/something')
string[] | $urlArr | List of full URLs to purge |
Definition at line 91 of file CdnCacheUpdate.php.
References $wgHTCPRouting, $wgSquidServers, and(), HTCPPurge(), and wfDebugLog().
Referenced by BenchmarkPurge\benchSquid(), HTMLCacheUpdateJob\invalidateTitles(), and CdnPurgeJob\run().
|
protected |
Collection of URLs to purge.
Definition at line 32 of file CdnCacheUpdate.php.