ZMCache
public interface ZMCache
| Field Summary | |
|---|---|
| final mixed | |
| final mixed | |
| Method Summary | |
|---|---|
| boolean | clear() Clear the 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 mixed PERSISTENT = 'persistent'
public final mixed TRANSIENT = 'transient'
public boolean clear()
Clear the cache.
true if cache cleared, false if the call failed.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(..).