[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/objectcache/ -> ObjectCache.php (summary)

Functions to get cache objects. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 161 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ObjectCache:: (7 methods):
  getInstance()
  clear()
  newFromId()
  newFromParams()
  newAnything()
  newAccelerator()
  newMemcached()


Class: ObjectCache  - X-Ref

Functions to get cache objects

getInstance( $id )   X-Ref
Get a cached instance of the specified type of cache object.

param: string $id
return: BagOStuff

clear()   X-Ref
Clear all the cached instances.


newFromId( $id )   X-Ref
Create a new cache object of the specified type.

param: string $id
return: BagOStuff

newFromParams( $params )   X-Ref
Create a new cache object from parameters

param: array $params
return: BagOStuff

newAnything( $params )   X-Ref
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.
param: array $params
return: BagOStuff

newAccelerator( $params, $fallback = null )   X-Ref
Factory function referenced from DefaultSettings.php for CACHE_ACCEL.

This will look for any APC style server-local cache.
A fallback cache can be specified if none is found.

param: array $params
param: int|string $fallback Fallback cache, e.g. (CACHE_NONE, "hash") (since 1.24)
return: BagOStuff

newMemcached( $params )   X-Ref
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.

param: array $params
return: MemcachedPhpBagOStuff



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1