- See also
- ObjectCacheFactory
Definition at line 30 of file ObjectCache.php.
◆ clear()
static ObjectCache::clear |
( |
| ) |
|
|
static |
- Deprecated
- since 1.42, Use ObjectCacheFactory::clear() instead.
Clear all the cached instances.
Definition at line 181 of file ObjectCache.php.
◆ getAnythingId()
static ObjectCache::getAnythingId |
( |
| ) |
|
|
static |
◆ getInstance()
static ObjectCache::getInstance |
( |
| $id | ) |
|
|
static |
Get a cached instance of the specified type of cache object.
- Deprecated
- Use ObjectCacheFactory::getInstance instead.
- Parameters
-
string | int | $id | A key in $wgObjectCaches. |
- Returns
- BagOStuff
Definition at line 51 of file ObjectCache.php.
◆ getLocalClusterInstance()
static ObjectCache::getLocalClusterInstance |
( |
| ) |
|
|
static |
◆ getLocalServerInstance()
static ObjectCache::getLocalServerInstance |
( |
| $fallback = CACHE_NONE | ) |
|
|
static |
- Deprecated
- since 1.42, Use ObjectCacheFactory::getLocalServerInstance()
- Parameters
-
int | string | array | $fallback | Fallback cache or parameter map with 'fallback' |
- Returns
- BagOStuff
- Exceptions
-
- Since
- 1.27
Definition at line 132 of file ObjectCache.php.
References $fallback.
◆ isDatabaseId()
static ObjectCache::isDatabaseId |
( |
| $id | ) |
|
|
static |
◆ makeLocalServerCache()
static ObjectCache::makeLocalServerCache |
( |
| $keyspace | ) |
|
|
static |
Create a new BagOStuff instance for local-server caching.
Only use this if you explicitly require the creation of a fresh instance. Whenever possible, use or inject the object from MediaWikiServices::getLocalServerObjectCache() instead.
NOTE: This method is called very early via Setup.php by ExtensionRegistry, and thus must remain fairly standalone so as to not cause initialization of the MediaWikiServices singleton.
- Access: internal
- For use by ServiceWiring and ExtensionRegistry. There are use cases whereby we want to build up local server cache without service wiring available.
- Since
- 1.35
- Parameters
-
- Returns
- BagOStuff
Definition at line 203 of file ObjectCache.php.
◆ newAnything()
static ObjectCache::newAnything |
( |
| ) |
|
|
static |
Factory function for CACHE_ANYTHING (referenced by configuration)
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.
- Deprecated
- since 1.42, Use ObjectCacheFactory::newInstance( ObjectCache::getAnythingId() );
- Returns
- BagOStuff
Definition at line 83 of file ObjectCache.php.
◆ newFromParams()
static ObjectCache::newFromParams |
( |
array | $params | ) |
|
|
static |
◆ $instances
◆ $localServerCacheClass
string ObjectCache::$localServerCacheClass |
|
static |
The documentation for this class was generated from the following file: