MediaWiki
REL1_22
|
Functions to get cache objects. More...
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() |
Functions to get cache objects.
Definition at line 29 of file ObjectCache.php.
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.
$id | string |
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.
$params | array |
MWException |
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.
$params | array |
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.
$id | string |
MWException |
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.
$params | array |
MWException |
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.
$params | array |
Definition at line 150 of file ObjectCache.php.
References $params.
ObjectCache::$instances = array() [static] |
Definition at line 30 of file ObjectCache.php.