ZMCache
public interface ZMCache
| Constant Summary | |
|---|---|
| final static str | Cache type persistent. |
| final static str | Cache type transient. |
| Method Summary | |
|---|---|
| boolean | clear() Clear the cache. |
| array | getStats() Return some stats and info abuot this cache. |
| void | init(string group, array config) Init the instance. |
| boolean | Check if this cache instance is available. |
| int | Return the caches last modification time |
| string | lookup(string id) Test if a valid cache entry exists and, if it does, return it |
| void | remove(string id) Remove the cache entry for the given id. |
| boolean | save(mixed data, string id) Save some data in a cache file |
public final static str PERSISTENT = 'org.zenmagick.core.services.cache.type.persistent'
Cache type persistent.
public final static str TRANSIENT = 'org.zenmagick.core.services.cache.type.transient'
Cache type transient.
public boolean clear()
Clear the cache.
true if cache cleared, false if the call failed.public array getStats()
Return some stats and info abuot this cache.
public void init(string group, array config)
Init the instance.
public boolean isAvailable()
Check if this cache instance is available.
true if this cache is ready to be used.public int lastModified()
Return the caches last modification time
public string lookup(string id)
Test if a valid cache entry exists and, if it does, return it
false.public void remove(string id)
Remove the cache entry for the given id.
public boolean save(mixed data, string id)
Save some data in a cache file
true if saved, false if not.
Generic cache interface.
Instances may be obtained by using
ZMCaches::instance()->getCache(..).