MediaWiki  REL1_22
ObjectCache Class Reference

Functions to get cache objects. More...

List of all members.

Static Public Member Functions

static clear ()
 Clear all the cached instances.
static getInstance ($id)
 Get a cached instance of the specified type of cache object.
static newAccelerator ($params)
 Factory function referenced from DefaultSettings.php for CACHE_ACCEL.
static newAnything ($params)
 Factory function referenced from DefaultSettings.php for CACHE_ANYTHING.
static newFromId ($id)
 Create a new cache object of the specified type.
static newFromParams ($params)
 Create a new cache object from parameters.
static newMemcached ($params)
 Factory function that creates a memcached client object.

Static Public Attributes

static $instances = array()

Detailed Description

Functions to get cache objects.

Definition at line 29 of file ObjectCache.php.


Member Function Documentation

static ObjectCache::clear ( ) [static]

Clear all the cached instances.

Definition at line 52 of file ObjectCache.php.

References array().

Referenced by ForkController\prepareEnvironment().

static ObjectCache::getInstance ( id) [static]

Get a cached instance of the specified type of cache object.

Parameters:
$idstring
Returns:
BagOStuff

Definition at line 39 of file ObjectCache.php.

References newFromId().

Referenced by ObjectCacheSessionHandler\getCache(), newAnything(), wfGetCache(), wfGetLangConverterCacheStorage(), wfGetMainCache(), wfGetMessageCacheStorage(), and wfGetParserCacheStorage().

static ObjectCache::newAccelerator ( params) [static]

Factory function referenced from DefaultSettings.php for CACHE_ACCEL.

Parameters:
$paramsarray
Exceptions:
MWException
Returns:
BagOStuff

Definition at line 125 of file ObjectCache.php.

References newFromId(), and wfIniGetBool().

static ObjectCache::newAnything ( params) [static]

Factory function referenced from DefaultSettings.php for CACHE_ANYTHING.

CACHE_ANYTHING means that stuff has to be cached, not caching is not an option. If a caching method is configured for any of the main caches ($wgMainCacheType, $wgMessageCacheType, $wgParserCacheType), then CACHE_ANYTHING will effectively be an alias to the configured cache choice for that. If no cache choice is configured (by default $wgMainCacheType is CACHE_NONE), then CACHE_ANYTHING will forward to CACHE_DB.

Parameters:
$paramsarray
Returns:
BagOStuff

Definition at line 107 of file ObjectCache.php.

References $wgMainCacheType, array(), as, getInstance(), and global.

static ObjectCache::newFromId ( id) [static]

Create a new cache object of the specified type.

Parameters:
$idstring
Exceptions:
MWException
Returns:
BagOStuff

Definition at line 64 of file ObjectCache.php.

References global, and newFromParams().

Referenced by getInstance(), newAccelerator(), and BagOStuffTest\setUp().

static ObjectCache::newFromParams ( params) [static]

Create a new cache object from parameters.

Parameters:
$paramsarray
Exceptions:
MWException
Returns:
BagOStuff

Definition at line 83 of file ObjectCache.php.

References $params.

Referenced by MultiWriteBagOStuff\__construct(), and newFromId().

static ObjectCache::newMemcached ( params) [static]

Factory function that creates a memcached client object.

This always uses the PHP client, since the PECL client has a different hashing scheme and a different interpretation of the flags bitfield, so switching between the two clients randomly would be disastrous.

Parameters:
$paramsarray
Returns:
MemcachedPhpBagOStuff

Definition at line 150 of file ObjectCache.php.

References $params.


Member Data Documentation

ObjectCache::$instances = array() [static]

Definition at line 30 of file ObjectCache.php.


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