MediaWiki REL1_37
|
Class to invalidate the CDN and HTMLFileCache entries associated with URLs/titles. More...
Public Member Functions | |
__construct (HookContainer $hookContainer, TitleFactory $titleFactory, $reboundDelay, $useFileCache, $cdnMaxAge) | |
getUrls (PageReference $page, int $flags=0) | |
Get a list of URLs to purge from the CDN cache when this page changes. | |
purgeTitleUrls ( $pages, $flags=self::PURGE_PRESEND, array $unless=[]) | |
Purge the CDN/HTMLFileCache for a title or the titles yielded by an iterator. | |
purgeUrls ( $urls, $flags=self::PURGE_PRESEND, array $unless=[]) | |
Purge the CDN for a URL or list of URLs. | |
Private Member Functions | |
fieldHasFlag ( $flags, $flag) | |
Private Attributes | |
int | $cdnMaxAge |
Max seconds for CDN to served cached objects without revalidation. | |
HookRunner | $hookRunner |
int | $reboundDelay |
Seconds between initial and rebound purges; 0 if disabled. | |
TitleFactory | $titleFactory |
int | $useFileCache |
Whether filesystem-based HTML output caching is enabled. | |
Class to invalidate the CDN and HTMLFileCache entries associated with URLs/titles.
Definition at line 32 of file HtmlCacheUpdater.php.
HtmlCacheUpdater::__construct | ( | HookContainer | $hookContainer, |
TitleFactory | $titleFactory, | ||
$reboundDelay, | |||
$useFileCache, | |||
$cdnMaxAge | |||
) |
HookContainer | $hookContainer | |
TitleFactory | $titleFactory | |
int | $reboundDelay | $wgCdnReboundPurgeDelay |
bool | $useFileCache | $wgUseFileCache |
int | $cdnMaxAge | $wgCdnMaxAge |
Definition at line 97 of file HtmlCacheUpdater.php.
|
private |
int | $flags | Bit field |
int | $flag | Constant to check for |
Definition at line 116 of file HtmlCacheUpdater.php.
Referenced by purgeTitleUrls(), and purgeUrls().
HtmlCacheUpdater::getUrls | ( | PageReference | $page, |
int | $flags = 0 |
||
) |
Get a list of URLs to purge from the CDN cache when this page changes.
PageReference | $page | |
int | $flags | Bit field of PURGE_URLS_* class constants (optional). |
Definition at line 204 of file HtmlCacheUpdater.php.
Referenced by purgeTitleUrls().
HtmlCacheUpdater::purgeTitleUrls | ( | $pages, | |
$flags = self::PURGE_PRESEND , |
|||
array | $unless = [] |
||
) |
Purge the CDN/HTMLFileCache for a title or the titles yielded by an iterator.
All cacheable canonical URLs associated with the titles will be purged from CDN. All cacheable actions associated with the titles will be purged from HTMLFileCache.
Traversable | PageReference[] | PageReference | $pages | PageReference or iterator yielding PageReference instances |
int | $flags | Bit field of class PURGE_* constants [Default: HtmlCacheUpdater::PURGE_PRESEND] |
mixed[] | $unless | Optional map of (HtmlCacheUpdater::UNLESS_* constant => value) |
Definition at line 160 of file HtmlCacheUpdater.php.
References $title, fieldHasFlag(), getUrls(), HtmlFileCacheUpdate\newFromPages(), and purgeUrls().
HtmlCacheUpdater::purgeUrls | ( | $urls, | |
$flags = self::PURGE_PRESEND , |
|||
array | $unless = [] |
||
) |
Purge the CDN for a URL or list of URLs.
string[] | string | $urls | URL or list of URLs |
int | $flags | Bit field of class PURGE_* constants [Default: HtmlCacheUpdater::PURGE_PRESEND] |
mixed[] | $unless | Optional map of (HtmlCacheUpdater::UNLESS_* constant => value) |
Definition at line 128 of file HtmlCacheUpdater.php.
References fieldHasFlag().
Referenced by purgeTitleUrls().
|
private |
Max seconds for CDN to served cached objects without revalidation.
Definition at line 38 of file HtmlCacheUpdater.php.
|
private |
Definition at line 41 of file HtmlCacheUpdater.php.
|
private |
Seconds between initial and rebound purges; 0 if disabled.
Definition at line 34 of file HtmlCacheUpdater.php.
|
private |
Definition at line 86 of file HtmlCacheUpdater.php.
|
private |
Whether filesystem-based HTML output caching is enabled.
Definition at line 36 of file HtmlCacheUpdater.php.