MediaWiki
REL1_20
|
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) | |
Used to provide a unique id for the PoolCounter. | |
save ($parserOutput, $article, $popts) | |
Static Public Member Functions | |
static | singleton () |
Get an instance of this object. | |
Public Attributes | |
const | try116cache = false |
Protected Member Functions | |
__construct ($memCached) | |
Setup a cache pathway with a given back-end storage mechanism. | |
getOptionsKey ($article) | |
getParserOutputKey ($article, $hash) | |
Private Attributes | |
$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.
$memCached | Object |
Definition at line 52 of file ParserCache.php.
ParserCache::get | ( | $ | article, |
$ | popts, | ||
$ | useOutdated = false |
||
) |
Retrieve the ParserOutput from ParserCache.
false if not found or outdated.
$article | Article |
$popts | ParserOptions |
$useOutdated | Boolean (default false) |
Definition at line 167 of file ParserCache.php.
References $value, getKey(), getParserOutputKey(), ParserOptions\legacyOptions(), wfDebug(), wfIncrStats(), wfProfileIn(), and wfProfileOut().
ParserCache::getDirty | ( | $ | article, |
$ | popts | ||
) |
Retrieve the ParserOutput from ParserCache, even if it's outdated.
$article | Article |
$popts | ParserOptions |
Definition at line 110 of file ParserCache.php.
References $value.
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 |
$popts | ParserOptions |
Definition at line 98 of file ParserCache.php.
References getParserOutputKey(), and ParserOptions\legacyOptions().
ParserCache::getKey | ( | $ | article, |
$ | popts, | ||
$ | useOutdated = true |
||
) |
Used to provide a unique id for the PoolCounter.
It would be preferable to have this code in get() instead of having Article looking in our internals.
$article | Article |
$popts | ParserOptions |
$useOutdated | Boolean (default true) |
Definition at line 127 of file ParserCache.php.
References getOptionsKey(), getParserOutputKey(), ParserOptions\legacyOptions(), ParserOptions\newFromUser(), wfDebug(), wfIncrStats(), and wfWarn().
Referenced by get().
ParserCache::getOptionsKey | ( | $ | article | ) | [protected] |
$article | Article |
Definition at line 79 of file ParserCache.php.
References wfMemcKey().
ParserCache::getParserOutputKey | ( | $ | article, |
$ | hash | ||
) | [protected] |
$article | Article |
$hash | string |
Definition at line 64 of file ParserCache.php.
References wfMemcKey().
ParserCache::save | ( | $ | parserOutput, |
$ | article, | ||
$ | popts | ||
) |
$parserOutput | ParserOutput |
$article | Article |
$popts | ParserOptions |
Definition at line 226 of file ParserCache.php.
References getOptionsKey(), getParserOutputKey(), CacheTime\updateCacheExpiry(), wfDebug(), and wfTimestampNow().
static ParserCache::singleton | ( | ) | [static] |
Get an instance of this object.
Definition at line 37 of file ParserCache.php.
References $parserMemc.
Referenced by ApiPurge\execute(), PoolWorkArticleView\fallback(), PoolWorkArticleView\getParserOutput(), and ParserOptionsTest\setUp().
ParserCache::$mMemc [private] |
Definition at line 29 of file ParserCache.php.
const ParserCache::try116cache = false |
Definition at line 30 of file ParserCache.php.