MediaWiki
REL1_20
|
Page view caching in the file system. More...
Public Member Functions | |
loadFromFileCache (IContextSource $context) | |
Read from cache to context output. | |
saveToFileCache ($text) | |
Save this cache object with the given text. | |
Static Public Member Functions | |
static | clearFileCache (Title $title) |
Clear the file caches for a page for all actions. | |
static | newFromTitle ($title, $action) |
Construct an ObjectFileCache from a Title and an action. | |
static | useFileCache (IContextSource $context) |
Check if pages can be cached for this request/user. | |
Protected Member Functions | |
cacheDirectory () | |
Get the base file cache directory. | |
typeSubdirectory () | |
Get the cache type subdirectory (with the trailing slash) or the empty string Alter the type -> directory mapping to put action=view cache at the root. | |
Static Protected Member Functions | |
static | cacheablePageActions () |
Cacheable actions. |
Page view caching in the file system.
The only cacheable actions are "view" and "history". Also special pages will not be cached.
Definition at line 31 of file HTMLFileCache.php.
static HTMLFileCache::cacheablePageActions | ( | ) | [static, protected] |
Cacheable actions.
Definition at line 58 of file HTMLFileCache.php.
Referenced by newFromTitle().
HTMLFileCache::cacheDirectory | ( | ) | [protected] |
Get the base file cache directory.
Reimplemented from FileCacheBase.
Definition at line 66 of file HTMLFileCache.php.
References FileCacheBase\baseCacheDirectory().
static HTMLFileCache::clearFileCache | ( | Title $ | title | ) | [static] |
Clear the file caches for a page for all actions.
$title | Title |
Definition at line 201 of file HTMLFileCache.php.
References newFromTitle().
Referenced by Title\invalidateCache(), and WikiPage\onArticleEdit().
HTMLFileCache::loadFromFileCache | ( | IContextSource $ | context | ) |
Read from cache to context output.
$context | IContextSource |
Definition at line 127 of file HTMLFileCache.php.
References FileCacheBase\cachePath(), IContextSource\getOutput(), FileCacheBase\useGzip(), wfClientAcceptsGzip(), and wfDebug().
static HTMLFileCache::newFromTitle | ( | $ | title, |
$ | action | ||
) | [static] |
Construct an ObjectFileCache from a Title and an action.
$title | Title|string Title object or prefixed DB key string |
$action | string |
Definition at line 38 of file HTMLFileCache.php.
References $title, and cacheablePageActions().
Referenced by clearFileCache(), RebuildFileCache\execute(), MediaWiki\main(), and HistoryAction\onView().
HTMLFileCache::saveToFileCache | ( | $ | text | ) |
Save this cache object with the given text.
Use this as an ob_start() handler.
$text | string |
Definition at line 157 of file HTMLFileCache.php.
References FileCacheBase\saveText(), FileCacheBase\useGzip(), wfClientAcceptsGzip(), wfDebug(), and wfTimestampNow().
HTMLFileCache::typeSubdirectory | ( | ) | [protected] |
Get the cache type subdirectory (with the trailing slash) or the empty string Alter the type -> directory mapping to put action=view cache at the root.
Reimplemented from FileCacheBase.
Definition at line 76 of file HTMLFileCache.php.
static HTMLFileCache::useFileCache | ( | IContextSource $ | context | ) | [static] |
Check if pages can be cached for this request/user.
$context | IContextSource |
Definition at line 89 of file HTMLFileCache.php.
References $user, $wgContLang, IContextSource\getLanguage(), IContextSource\getRequest(), IContextSource\getUser(), and wfDebug().
Referenced by MediaWiki\main(), and HistoryAction\onView().