MediaWiki
1.23.2
|
Functions to get cache objects. More...
Static Public Member Functions | |
static | clear () |
Clear all the cached instances. More... | |
static | getInstance ( $id) |
Get a cached instance of the specified type of cache object. More... | |
static | newAccelerator ( $params) |
Factory function referenced from DefaultSettings.php for CACHE_ACCEL. More... | |
static | newAnything ( $params) |
Factory function referenced from DefaultSettings.php for CACHE_ANYTHING. More... | |
static | newFromId ( $id) |
Create a new cache object of the specified type. More... | |
static | newFromParams ( $params) |
Create a new cache object from parameters. More... | |
static | newMemcached ( $params) |
Factory function that creates a memcached client object. More... | |
Static Public Attributes | |
static | $instances = array() |
Functions to get cache objects.
Definition at line 29 of file ObjectCache.php.
|
static |
Clear all the cached instances.
Definition at line 52 of file ObjectCache.php.
References array().
Referenced by ForkController\prepareEnvironment().
|
static |
Get a cached instance of the specified type of cache object.
$id | string |
Definition at line 39 of file ObjectCache.php.
References newFromId().
Referenced by ObjectCacheSessionHandler\getCache(), and newAnything().
|
static |
Factory function referenced from DefaultSettings.php for CACHE_ACCEL.
$params | array |
MWException |
Definition at line 125 of file ObjectCache.php.
References newFromId(), and wfIniGetBool().
Referenced by DBLockManager\__construct(), SwiftFileBackend\__construct(), and UIDGenerator\getSequentialPerNodeIDs().
|
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.
$params | array |
Definition at line 107 of file ObjectCache.php.
References array(), as, CACHE_ANYTHING, CACHE_DB, CACHE_NONE, getInstance(), and global.
|
static |
Create a new cache object of the specified type.
$id | string |
MWException |
Definition at line 64 of file ObjectCache.php.
References global, and newFromParams().
Referenced by getInstance(), newAccelerator(), and BagOStuffTest\setUp().
|
static |
Create a new cache object from parameters.
$params | array |
MWException |
Definition at line 83 of file ObjectCache.php.
References $params.
Referenced by MultiWriteBagOStuff\__construct(), MemcLockManager\__construct(), and newFromId().
|
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.
$params | array |
Definition at line 150 of file ObjectCache.php.
References $params.
|
static |
Definition at line 30 of file ObjectCache.php.
Referenced by MediaWikiTestCase\run().