MediaWiki  REL1_19
HTMLFileCache Class Reference
Inheritance diagram for HTMLFileCache:
Collaboration diagram for HTMLFileCache:

List of all members.

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.

Detailed Description

Definition at line 7 of file HTMLFileCache.php.


Member Function Documentation

static HTMLFileCache::cacheablePageActions ( ) [static, protected]

Cacheable actions.

Returns:
array

Definition at line 34 of file HTMLFileCache.php.

Referenced by newFromTitle().

Here is the caller graph for this function:

Get the base file cache directory.

Returns:
string

Reimplemented from FileCacheBase.

Definition at line 42 of file HTMLFileCache.php.

References FileCacheBase\baseCacheDirectory().

Here is the call graph for this function:

static HTMLFileCache::clearFileCache ( Title title) [static]

Clear the file caches for a page for all actions.

Parameters:
$titleTitle
Returns:
bool Whether $wgUseFileCache is enabled

Definition at line 174 of file HTMLFileCache.php.

References $wgUseFileCache, and newFromTitle().

Referenced by Title\invalidateCache(), HTMLCacheUpdate\invalidateTitles(), WikiPage\onArticleDelete(), and WikiPage\onArticleEdit().

Here is the call graph for this function:

Here is the caller graph for this function:

Read from cache to context output.

Parameters:
$contextIContextSource
Returns:
void

Definition at line 103 of file HTMLFileCache.php.

References $wgLanguageCode, $wgMimeType, FileCacheBase\cachePath(), IContextSource\getOutput(), FileCacheBase\useGzip(), wfClientAcceptsGzip(), and wfDebug().

Here is the call graph for this function:

static HTMLFileCache::newFromTitle ( title,
action 
) [static]

Construct an ObjectFileCache from a Title and an action.

Parameters:
$titleTitle|string Title object or prefixed DB key string
$actionstring
Returns:
HTMLFileCache

Definition at line 14 of file HTMLFileCache.php.

References $title, and cacheablePageActions().

Referenced by clearFileCache(), RebuildFileCache\execute(), DBConnectionError\fileCachedPage(), MediaWiki\main(), and HistoryAction\onView().

Here is the call graph for this function:

Here is the caller graph for this function:

Save this cache object with the given text.

Use this as an ob_start() handler.

Parameters:
$textstring
Returns:
bool Whether $wgUseFileCache is enabled

Definition at line 130 of file HTMLFileCache.php.

References $wgUseFileCache, FileCacheBase\saveText(), FileCacheBase\useGzip(), wfClientAcceptsGzip(), wfDebug(), and wfTimestampNow().

Here is the call graph for this function:

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.

Returns:
string

Reimplemented from FileCacheBase.

Definition at line 52 of file HTMLFileCache.php.

static HTMLFileCache::useFileCache ( IContextSource context) [static]

Check if pages can be cached for this request/user.

Parameters:
$contextIContextSource
Returns:
bool

Definition at line 65 of file HTMLFileCache.php.

References $user, $wgContLang, $wgDebugToolbar, $wgShowIPinHeader, $wgUseFileCache, IContextSource\getLanguage(), IContextSource\getRequest(), IContextSource\getUser(), and wfDebug().

Referenced by Article\isFileCacheable(), MediaWiki\main(), and HistoryAction\onView().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: