ZenMagick 0.9.10


org.zenmagick.core.services.cache\ZMCaches
core\services\cache\ZMCaches.php at line 37

Class ZMCaches

ZMObject
└─ZMCaches

public class ZMCaches
extends ZMObject

Caching service.

Commonly supported caching options are:

Right now the only implementation supported is ZMFileCache.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create new instance.

ZMCache

getCache(string group, array config, string type)

Get a cache instance for the given group and configuration.

array

getCaches()

Get a list of all currently active caches.

array

getProviders()

Get a list of all providers.

static void

instance()

Get instance.

Methods inherited from org.zenmagick.core\ZMObject
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

core\services\cache\ZMCaches.php at line 46

__construct

public void __construct()

Create new instance.


core\services\cache\ZMCaches.php at line 85

getCache

public ZMCache getCache(string group, array config, string type)

Get a cache instance for the given group and configuration.

If the type is specified and it is neither ZMCache::PERSISTENT nor ZMCache::TRANSIENT it will be taken as actual implementation name.

The rule for generating the class name of the implementation class is * ucwords[$type]Cache. So, for example a type value of memcache would result in MemcacheCache.

Parameters:
group - The cache group.
config - Configuration; default is an empty array.
type - Optional cache type; default is ZMCache::PERSISTENT.
Returns:
A cache instance or null.
See Also:
ZMCache::PERSISTENT
ZMCache::TRANSIENT

core\services\cache\ZMCaches.php at line 110

getCaches

public array getCaches()

Get a list of all currently active caches.

Returns:
List of caches.

core\services\cache\ZMCaches.php at line 121

getProviders

public array getProviders()

Get a list of all providers.

Returns:
List of all caches (instantiated).

core\services\cache\ZMCaches.php at line 63

instance

public static void instance()

Get instance.


ZenMagick 0.9.10