MediaWiki  REL1_20
SquidUpdate Class Reference

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

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 getRuleForURL ($url, $rules)
 Find the HTCP routing rule to use for a given URL.
static HTCPPurge ($urlArr)
static newFromLinksTo (&$title)
static newFromTitles ($titles, $urlArr=array())
 Create a SquidUpdate from an array of Title objects, or a TitleArray object.
static newSimplePurge (&$title)
static purge ($urlArr)
 Purges a list of Squids defined in $wgSquidServers.

Public Attributes

 $mMaxTitles
 $urlArr

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:
$urlArrarray
$maxTitlesbool|int

Definition at line 35 of file SquidUpdate.php.

References $urlArr.


Member Function Documentation

Purges the list of URLs passed to the constructor.

Definition at line 112 of file SquidUpdate.php.

References purge().

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:
$urlstring
Returns:
string

Definition at line 249 of file SquidUpdate.php.

References $url, and wfExpandUrl().

Referenced by HTCPPurge().

static SquidUpdate::getRuleForURL ( url,
rules 
) [static]

Find the HTCP routing rule to use for a given URL.

Parameters:
$urlstring URL to match
$rulesarray Array of rules, see $wgHTCPMulticastRouting for format and behavior
Returns:
mixed Element of $rules that matched, or false if nothing matched

Definition at line 259 of file SquidUpdate.php.

References $url.

Referenced by HTCPPurge().

static SquidUpdate::HTCPPurge ( urlArr) [static]
Exceptions:
MWException
Parameters:
$urlArrarray

Definition at line 166 of file SquidUpdate.php.

References $url, $urlArr, expand(), getRuleForURL(), wfDebug(), wfProfileIn(), and wfProfileOut().

Referenced by purge().

static SquidUpdate::newFromLinksTo ( &$  title) [static]
Parameters:
$titleTitle
Returns:
SquidUpdate

Definition at line 54 of file SquidUpdate.php.

References $dbr, $res, $title, Title\makeTitle(), wfGetDB(), wfProfileIn(), and wfProfileOut().

static SquidUpdate::newFromTitles ( titles,
urlArr = array() 
) [static]

Create a SquidUpdate from an array of Title objects, or a TitleArray object.

Parameters:
$titlesarray
$urlArrarray
Returns:
SquidUpdate

Definition at line 87 of file SquidUpdate.php.

References $title, and $urlArr.

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

Definition at line 104 of file SquidUpdate.php.

References $title, and $urlArr.

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:
$urlArrarray
Returns:
void

Definition at line 125 of file SquidUpdate.php.

References $url, $urlArr, HTCPPurge(), wfProfileIn(), and wfProfileOut().

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


Member Data Documentation

SquidUpdate::$mMaxTitles

Definition at line 29 of file SquidUpdate.php.

SquidUpdate::$urlArr

Definition at line 29 of file SquidUpdate.php.

Referenced by __construct(), HTCPPurge(), newFromTitles(), newSimplePurge(), and purge().


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