Framework
3.9
|
The Cache class provides a simple caching interface. More...
Static Public Member Functions | |
static | getInstance () |
static | get ($key) |
Retrieve the specified object from the cache. More... | |
static | put ($key, $obj, $ttl=0) |
Store the specified object in the cache at the specified key. More... | |
static | invalidate ($key) |
Invalidates the specifed entry in the cache. More... | |
static | invalidateMatching ($pattern) |
Invalidate all entries in the cache that match a specific pattern. More... | |
static | clear () |
Clear the cache, deleting all records. More... | |
static | dump () |
Output a dump of the cache for debugging purposes. More... | |
Static Public Attributes | |
static | $instance |
static | $app_name |
The Cache class provides a simple caching interface.
If APC is installed and enabled, caching will be done through APC and will be available across page accesses. If APC is not available, a simple in-memory hash is used.
|
static |
|
static |
Output a dump of the cache for debugging purposes.
|
static |
|
static |
Definition at line 46 of file cache.inc.
|
static |
Invalidates the specifed entry in the cache.
This can be used to flag items in the cache that have potentially been updated by other actions. These items are removed from the cache upon invalidation. If the item has not been cached, no action is taken.
string | $key | the entry to be invalidated |
Definition at line 119 of file cache.inc.
|
static |
Invalidate all entries in the cache that match a specific pattern.
This can be used to flag items in the cache that have potentially been updated by other actions. These items are removed from the cache upon invalidation. If the item has not been cached, no action is taken.
string | $pattern | PCRE describing the matching keys |
Definition at line 133 of file cache.inc.
|
static |
Store the specified object in the cache at the specified key.
If APC cacheing is enabled then this value will be available to subsequent script invocations, and the $ttl parameter can optionally be used to specify the time-to-live of the cache record. If APC is enabled and the TTL is not specified then the item will stay in the cache until it is invalidated. If APC is not enabled then the item will only remain in the cache for the rest of this script invocation.
string | $key | the key that the value will be cached under. |
mixed | $obj | the object or value to be cached |
integer | $ttl | the time-to-live for the cache entry, in seconds |
Definition at line 106 of file cache.inc.