MediaWiki
REL1_22
|
Handles purging appropriate Squid URLs given a title (or titles) More...
Public Member Functions | |
__construct ($urlArr=array(), $maxTitles=false) | |
doUpdate () | |
Purges the list of URLs passed to the constructor. | |
Static Public Member Functions | |
static | expand ($url) |
Expand local URLs to fully-qualified URLs using the internal protocol and host defined in $wgInternalServer. | |
static | HTCPPurge ($urlArr) |
Send Hyper Text Caching Protocol (HTCP) CLR requests. | |
static | newFromLinksTo (Title $title) |
Create a SquidUpdate from the given Title object. | |
static | newFromTitles ($titles, $urlArr=array()) |
Create a SquidUpdate from an array of Title objects, or a TitleArray object. | |
static | newSimplePurge (Title $title) |
static | purge ($urlArr) |
Purges a list of Squids defined in $wgSquidServers. | |
Protected Attributes | |
array | $urlArr |
Collection of URLs to purge. | |
Static Private Member Functions | |
static | getRuleForURL ($url, $rules) |
Find the HTCP routing rule to use for a given URL. |
Handles purging appropriate Squid URLs given a title (or titles)
Definition at line 28 of file SquidUpdate.php.
SquidUpdate::__construct | ( | $ | urlArr = array() , |
$ | maxTitles = false |
||
) |
array | $urlArr | Collection of URLs to purge |
bool | int | $maxTitles | Maximum number of unique URLs to purge |
Definition at line 39 of file SquidUpdate.php.
Purges the list of URLs passed to the constructor.
Definition at line 119 of file SquidUpdate.php.
static SquidUpdate::expand | ( | $ | url | ) | [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 281 of file SquidUpdate.php.
Referenced by SquidPurgeClient\queuePurge().
static SquidUpdate::getRuleForURL | ( | $ | url, |
$ | rules | ||
) | [static, private] |
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 291 of file SquidUpdate.php.
static SquidUpdate::HTCPPurge | ( | $ | urlArr | ) | [static] |
Send Hyper Text Caching Protocol (HTCP) CLR requests.
MWException |
array | $urlArr | Collection of URLs to purge |
Definition at line 180 of file SquidUpdate.php.
static SquidUpdate::newFromLinksTo | ( | Title $ | title | ) | [static] |
Create a SquidUpdate from the given Title object.
The resulting SquidUpdate will purge the given Title's URLs as well as the pages that link to it. Capped at $wgMaxSquidPurgeTitles total URLs.
Title | $title |
Definition at line 63 of file SquidUpdate.php.
static SquidUpdate::newFromTitles | ( | $ | titles, |
$ | urlArr = array() |
||
) | [static] |
Create a SquidUpdate from an array of Title objects, or a TitleArray object.
array | $titles | |
array | $urlArr |
Definition at line 95 of file SquidUpdate.php.
static SquidUpdate::newSimplePurge | ( | Title $ | title | ) | [static] |
static SquidUpdate::purge | ( | $ | urlArr | ) | [static] |
Purges a list of Squids defined in $wgSquidServers.
$urlArr should contain the full URLs to purge as values (example: $urlArr[] = 'http://my.host/something') XXX report broken Squids per mail or log
array | $urlArr | List of full URLs to purge |
Definition at line 131 of file SquidUpdate.php.
Referenced by BenchmarkPurge\benchSquid(), and RevDel_FileList\doPostCommitUpdates().
array SquidUpdate::$urlArr [protected] |
Collection of URLs to purge.
Definition at line 33 of file SquidUpdate.php.