MediaWiki
REL1_24
|
Public Member Functions | |
get ($article, $popts, $useOutdated=false) | |
Retrieve the ParserOutput from ParserCache. | |
getDirty ($article, $popts) | |
Retrieve the ParserOutput from ParserCache, even if it's outdated. | |
getETag ($article, $popts) | |
Provides an E-Tag suitable for the whole page. | |
getKey ($article, $popts, $useOutdated=true) | |
Generates a key for caching the given article considering the given parser options. | |
save ($parserOutput, $page, $popts, $cacheTime=null, $revId=null) | |
Static Public Member Functions | |
static | singleton () |
Get an instance of this object. | |
Protected Member Functions | |
__construct ($memCached) | |
Setup a cache pathway with a given back-end storage mechanism. | |
getOptionsKey ($article) | |
getParserOutputKey ($article, $hash) | |
Private Attributes | |
MWMemcached | $mMemc |
* |
Definition at line 28 of file ParserCache.php.
ParserCache::__construct | ( | $ | memCached | ) | [protected] |
Setup a cache pathway with a given back-end storage mechanism.
May be a memcached client or a BagOStuff derivative.
MWMemcached | $memCached |
MWException |
Definition at line 51 of file ParserCache.php.
ParserCache::get | ( | $ | article, |
$ | popts, | ||
$ | useOutdated = false |
||
) |
Retrieve the ParserOutput from ParserCache.
false if not found or outdated.
Article | $article | |
ParserOptions | $popts | |
bool | $useOutdated | (default false) |
Definition at line 184 of file ParserCache.php.
ParserCache::getDirty | ( | $ | article, |
$ | popts | ||
) |
Retrieve the ParserOutput from ParserCache, even if it's outdated.
Article | $article | |
ParserOptions | $popts |
Definition at line 109 of file ParserCache.php.
ParserCache::getETag | ( | $ | article, |
$ | popts | ||
) |
Provides an E-Tag suitable for the whole page.
Note that $article is just the main wikitext. The E-Tag has to be unique to the whole page, even if the article itself is the same, so it uses the complete set of user options. We don't want to use the preference of a different user on a message just because it wasn't used in $article. For example give a Chinese interface to a user with English preferences. That's why we take into account *all* user options. (r70809 CR)
Article | $article | |
ParserOptions | $popts |
Definition at line 97 of file ParserCache.php.
ParserCache::getKey | ( | $ | article, |
$ | popts, | ||
$ | useOutdated = true |
||
) |
Generates a key for caching the given article considering the given parser options.
Article | $article | |
ParserOptions | $popts | |
bool | $useOutdated | (default true) |
Definition at line 133 of file ParserCache.php.
ParserCache::getOptionsKey | ( | $ | article | ) | [protected] |
ParserCache::getParserOutputKey | ( | $ | article, |
$ | hash | ||
) | [protected] |
Article | $article | |
string | $hash |
Definition at line 63 of file ParserCache.php.
ParserCache::save | ( | $ | parserOutput, |
$ | page, | ||
$ | popts, | ||
$ | cacheTime = null , |
||
$ | revId = null |
||
) |
ParserOutput | $parserOutput | |
WikiPage | $page | |
ParserOptions | $popts | |
string | $cacheTime | Time when the cache was generated |
int | $revId | Revision ID that was parsed |
Definition at line 246 of file ParserCache.php.
static ParserCache::singleton | ( | ) | [static] |
Get an instance of this object.
Definition at line 35 of file ParserCache.php.
Referenced by CompareParserCache\execute(), ApiPurge\execute(), and RefreshLinksJob\runForTitle().
MWMemcached ParserCache::$mMemc [private] |
*
Definition at line 29 of file ParserCache.php.