MediaWiki  1.23.1
ObjectFileCache Class Reference

Object cache in the file system. More...

Inheritance diagram for ObjectFileCache:
Collaboration diagram for ObjectFileCache:

Static Public Member Functions

static newFromKey ( $key, $type)
 Construct an ObjectFileCache from a key and a type. More...
 

Protected Member Functions

 cacheDirectory ()
 Get the base file cache directory. More...
 
- Protected Member Functions inherited from FileCacheBase
 __construct ()
 
 baseCacheDirectory ()
 Get the base file cache directory. More...
 
 cacheMissKey ()
 
 cachePath ()
 Get the path to the cache file. More...
 
 checkCacheDirs ()
 Create parent directors of $this->cachePath() More...
 
 hashSubdirectory ()
 Return relative multi-level hash subdirectory (with trailing slash) or the empty string if not $wgFileCacheDepth. More...
 
 typeSubdirectory ()
 Get the cache type subdirectory (with trailing slash) An extending class could use that method to alter the type -> directory mapping. More...
 
 useGzip ()
 Check if the cache is gzipped. More...
 

Additional Inherited Members

- Public Member Functions inherited from FileCacheBase
 cacheTimestamp ()
 Get the last-modified timestamp of the cache file. More...
 
 clearCache ()
 Clear the cache for this page. More...
 
 fetchText ()
 Get the uncompressed text from the cache. More...
 
 getMissesRecent ()
 Roughly gets the cache misses in the last hour by unique visitors. More...
 
 incrMissesRecent (WebRequest $request)
 Roughly increments the cache misses in the last hour by unique visitors. More...
 
 isCached ()
 Check if the cache file exists. More...
 
 isCacheGood ( $timestamp='')
 Check if up to date cache file exists. More...
 
 saveText ( $text)
 Save and compress text to the cache. More...
 
- Public Attributes inherited from FileCacheBase
const MISS_FACTOR = 15
 
const MISS_TTL_SEC = 3600
 
- Protected Attributes inherited from FileCacheBase
 $mCached
 
 $mExt = 'cache'
 
 $mFilePath
 
 $mKey
 
 $mType = 'object'
 
 $mUseGzip
 

Detailed Description

Object cache in the file system.

Definition at line 29 of file ObjectFileCache.php.

Member Function Documentation

◆ cacheDirectory()

ObjectFileCache::cacheDirectory ( )
protected

Get the base file cache directory.

Returns
string

Reimplemented from FileCacheBase.

Definition at line 49 of file ObjectFileCache.php.

References FileCacheBase\baseCacheDirectory().

◆ newFromKey()

static ObjectFileCache::newFromKey (   $key,
  $type 
)
static

Construct an ObjectFileCache from a key and a type.

Parameters
$keystring
$typestring
Returns
ObjectFileCache

Definition at line 36 of file ObjectFileCache.php.

References $cache, and $type.


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