MediaWiki
REL1_19
|
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 12 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 36 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 |
Definition at line 148 of file ParserCache.php.
References $wgCacheEpoch, 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 93 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 81 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 |
Definition at line 108 of file ParserCache.php.
References $wgCacheEpoch, getOptionsKey(), getParserOutputKey(), ParserOptions\legacyOptions(), ParserOptions\newFromUser(), wfDebug(), wfIncrStats(), and wfWarn().
Referenced by get().
ParserCache::getOptionsKey | ( | $ | article | ) | [protected] |
$article | Article |
Definition at line 63 of file ParserCache.php.
References wfMemcKey().
Referenced by getKey(), and save().
ParserCache::getParserOutputKey | ( | $ | article, |
$ | hash | ||
) | [protected] |
$article | Article |
$hash | string |
Definition at line 48 of file ParserCache.php.
References wfMemcKey().
Referenced by get(), getETag(), getKey(), and save().
ParserCache::save | ( | $ | parserOutput, |
$ | article, | ||
$ | popts | ||
) |
$parserOutput | ParserOutput |
$article | Article |
$popts | ParserOptions |
Definition at line 207 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 21 of file ParserCache.php.
References $parserMemc.
Referenced by PoolWorkArticleView\__construct(), WikiPage\doEditUpdates(), PoolWorkArticleView\doWork(), ApiPurge\execute(), PoolWorkArticleView\fallback(), PoolWorkArticleView\getCachedWork(), WikiPage\getParserOutput(), ParserOptionsTest\setUp(), and Article\view().
ParserCache::$mMemc [private] |
Definition at line 13 of file ParserCache.php.
const ParserCache::try116cache = false |
Definition at line 14 of file ParserCache.php.