$cache
$cache : array
Holds the cached objects.
TriTan CMS APC Cache Class.
create(integer|string $key, mixed $data, string $namespace = 'default', integer $ttl)
Creates the APC cache item.
integer|string | $key | Unique key of the APC cached item. |
mixed | $data | Data that should be cached. |
string | $namespace | Optional. Where the cache contents are namespaced. Default: 'default'. |
integer | $ttl | Time to live sets the life of the APC cached item. Default: 0 = will persist until cleared. |
set(integer|string $key, mixed $data, string $namespace = 'default', integer $ttl)
Sets the data contents into the cache.
integer|string | $key | Unique key of the cache file. |
mixed | $data | Data that should be cached. |
string | $namespace | Optional. Where the cache contents are namespaced. Default: 'default'. |
integer | $ttl | Time to live sets the life of the cache file. Default: 0 = expires immediately after request. |
increment(integer|string $key, integer $offset = 1, string $namespace = 'default') : false|integer
Increments numeric cache item's value.
integer|string | $key | The cache key to increment |
integer | $offset | Optional. The amount by which to increment the item's value. Default: 1. |
string | $namespace | Optional. The namespace the key is in. Default: 'default'. |
False on failure, the item's new value on success.
decrement(integer|string $key, integer $offset = 1, string $namespace = 'default') : false|integer
Decrements numeric cache item's value.
integer|string | $key | The cache key to decrement. |
integer | $offset | Optional. The amount by which to decrement the item's value. Default: 1. |
string | $namespace | Optional. The namespace the key is in. Default: 'default'. |
False on failure, the item's new value on success.
update(integer|string $key, mixed $data, string $namespace = 'default', integer $ttl) : boolean
Updates the APC cache based on unique key.
integer|string | $key | Unique key of the APC cache. |
mixed | $data | Data that should be cached. |
string | $namespace | Optional. Where the cache contents are namespaced. Default: 'default'. |
integer | $ttl | Time to live sets the life of the APC cached item. Default: 0 = will persist until cleared. |
False if original value does not exist, true if contents were replaced
exists(integer|string $key, string $namespace) : boolean
Serves as a utility method to determine whether a key exists in the cache.
integer|string | $key | Cache key to check for existence. |
string | $namespace | Cache namespace for the key existence check. |
Whether the key exists in the cache for the given namespace.