MediaWiki
1.23.2
|
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. More... | |
Static Public Member Functions | |
static | expand ( $url) |
Expand local URLs to fully-qualified URLs using the internal protocol and host defined in $wgInternalServer. More... | |
static | HTCPPurge ( $urlArr) |
Send Hyper Text Caching Protocol (HTCP) CLR requests. More... | |
static | newFromLinksTo (Title $title) |
Create a SquidUpdate from the given Title object. More... | |
static | newFromTitles ( $titles, $urlArr=array()) |
Create a SquidUpdate from an array of Title objects, or a TitleArray object. More... | |
static | newSimplePurge (Title $title) |
static | purge ( $urlArr) |
Purges a list of Squids defined in $wgSquidServers. More... | |
Protected Attributes | |
array | $urlArr |
Collection of URLs to purge. More... | |
Static Private Member Functions | |
static | getRuleForURL ( $url, $rules) |
Find the HTCP routing rule to use for a given URL. More... | |
Handles purging appropriate Squid URLs given a title (or titles)
Definition at line 28 of file SquidUpdate.php.
array | $urlArr | Collection of URLs to purge |
bool | int | $maxTitles | Maximum number of unique URLs to purge |
Definition at line 38 of file SquidUpdate.php.
SquidUpdate::doUpdate | ( | ) |
Purges the list of URLs passed to the constructor.
Definition at line 122 of file SquidUpdate.php.
References 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 291 of file SquidUpdate.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 301 of file SquidUpdate.php.
References as.
Referenced by HTCPPurge().
|
static |
Send Hyper Text Caching Protocol (HTCP) CLR requests.
MWException |
array | $urlArr | Collection of URLs to purge |
Definition at line 183 of file SquidUpdate.php.
References $urlArr, array(), as, expand(), getRuleForURL(), global, UIDGenerator\newSequentialPerNodeIDs(), UIDGenerator\QUICK_VOLATILE, wfDebugLog(), wfProfileIn(), and wfProfileOut().
Referenced by purge().
|
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 62 of file SquidUpdate.php.
References $dbr, $res, $title, array(), as, DB_SLAVE, global, Title\makeTitle(), wfGetDB(), wfProfileIn(), and wfProfileOut().
|
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.
References $title, $titles, $urlArr, as, and global.
Referenced by HTMLCacheUpdateJob\invalidateTitles().
|
static |
Title | $title |
Definition at line 113 of file SquidUpdate.php.
References $title, and $urlArr.
Referenced by WikiPage\doPurge().
|
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 134 of file SquidUpdate.php.
References $urlArr, as, global, HTCPPurge(), wfDebugLog(), wfProfileIn(), and wfProfileOut().
Referenced by BenchmarkPurge\benchSquid(), LocalFile\delete(), LocalFile\deleteOld(), RevDel_FileList\doPostCommitUpdates(), doUpdate(), LocalFile\purgeCache(), LocalFile\purgeOldThumbnails(), LocalFile\purgeThumbnails(), LocalFile\recordUpload2(), and File\transform().
|
protected |
Collection of URLs to purge.
Definition at line 32 of file SquidUpdate.php.
Referenced by __construct(), HTCPPurge(), newFromTitles(), newSimplePurge(), and purge().