[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Cache for outputs of the PHP parser This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 290 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ParserCache:: (9 methods):
singleton()
__construct()
getParserOutputKey()
getOptionsKey()
getETag()
getDirty()
getKey()
get()
save()
Class: ParserCache - X-Ref
singleton() X-Ref |
Get an instance of this object return: ParserCache |
__construct( $memCached ) X-Ref |
Setup a cache pathway with a given back-end storage mechanism. May be a memcached client or a BagOStuff derivative. param: MWMemcached $memCached |
getParserOutputKey( $article, $hash ) X-Ref |
param: Article $article param: string $hash return: mixed|string |
getOptionsKey( $article ) X-Ref |
param: Article $article return: mixed|string |
getETag( $article, $popts ) X-Ref |
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) param: Article $article param: ParserOptions $popts return: string |
getDirty( $article, $popts ) X-Ref |
Retrieve the ParserOutput from ParserCache, even if it's outdated. param: Article $article param: ParserOptions $popts return: ParserOutput|bool False on failure |
getKey( $article, $popts, $useOutdated = true ) X-Ref |
Generates a key for caching the given article considering the given parser options. param: Article $article param: ParserOptions $popts param: bool $useOutdated (default true) return: bool|mixed|string |
get( $article, $popts, $useOutdated = false ) X-Ref |
Retrieve the ParserOutput from ParserCache. false if not found or outdated. param: Article $article param: ParserOptions $popts param: bool $useOutdated (default false) return: ParserOutput|bool False on failure |
save( $parserOutput, $page, $popts, $cacheTime = null, $revId = null ) X-Ref |
param: ParserOutput $parserOutput param: WikiPage $page param: ParserOptions $popts param: string $cacheTime Time when the cache was generated param: int $revId Revision ID that was parsed |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |