MediaWiki
REL1_22
|
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, $cacheTime=null) | |
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 |
MWException |
Definition at line 53 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 168 of file ParserCache.php.
References $article, $value, getKey(), getParserOutputKey(), global, 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 111 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 |
$popts | ParserOptions |
Definition at line 99 of file ParserCache.php.
References $article, 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 128 of file ParserCache.php.
References $article, getOptionsKey(), getParserOutputKey(), global, ParserOptions\legacyOptions(), ParserOptions\newFromUser(), wfDebug(), wfIncrStats(), and wfWarn().
Referenced by get().
ParserCache::getOptionsKey | ( | $ | article | ) | [protected] |
$article | Article |
Definition at line 80 of file ParserCache.php.
References $article, and wfMemcKey().
ParserCache::getParserOutputKey | ( | $ | article, |
$ | hash | ||
) | [protected] |
ParserCache::save | ( | $ | parserOutput, |
$ | article, | ||
$ | popts, | ||
$ | cacheTime = null |
||
) |
$parserOutput | ParserOutput |
$article | Article |
$popts | ParserOptions |
$cacheTime | Time when the cache was generated |
Definition at line 228 of file ParserCache.php.
References $article, 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, and global.
Referenced by ApiPurge\execute().
ParserCache::$mMemc [private] |
Definition at line 29 of file ParserCache.php.
const ParserCache::try116cache = false |
Definition at line 30 of file ParserCache.php.