MediaWiki  REL1_22
SquidUpdate Class Reference

Handles purging appropriate Squid URLs given a title (or titles) More...

Collaboration diagram for SquidUpdate:

List of all members.

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.

Detailed Description

Handles purging appropriate Squid URLs given a title (or titles)

Definition at line 28 of file SquidUpdate.php.


Constructor & Destructor Documentation

SquidUpdate::__construct ( urlArr = array(),
maxTitles = false 
)
Parameters:
array$urlArrCollection of URLs to purge
bool | int$maxTitlesMaximum number of unique URLs to purge

Definition at line 39 of file SquidUpdate.php.


Member Function Documentation

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.

Parameters:
string$url
Returns:
string

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.

Parameters:
string$urlURL to match
array$rulesArray of rules, see $wgHTCPRouting for format and behavior
Returns:
mixed Element of $rules that matched, or false if nothing matched

Definition at line 291 of file SquidUpdate.php.

static SquidUpdate::HTCPPurge ( urlArr) [static]

Send Hyper Text Caching Protocol (HTCP) CLR requests.

Exceptions:
MWException
Parameters:
array$urlArrCollection 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.

Parameters:
Title$title
Returns:
SquidUpdate

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.

Parameters:
array$titles
array$urlArr
Returns:
SquidUpdate

Definition at line 95 of file SquidUpdate.php.

static SquidUpdate::newSimplePurge ( Title title) [static]
Parameters:
Title$title
Returns:
SquidUpdate

Definition at line 111 of file SquidUpdate.php.

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

Parameters:
array$urlArrList of full URLs to purge

Definition at line 131 of file SquidUpdate.php.

Referenced by BenchmarkPurge\benchSquid(), and RevDel_FileList\doPostCommitUpdates().


Member Data Documentation

array SquidUpdate::$urlArr [protected]

Collection of URLs to purge.

Definition at line 33 of file SquidUpdate.php.


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