CacheProviderAPC
in package
implements
CacheProviderInterface
An implementation of the CacheProviderInterface interface that uses APC/APCu as the target store.
Tags
Table of Contents
Interfaces
- CacheProviderInterface
- An interface that contains the methods for a cache implementation for storing business objects and other less complex values.
Properties
- $appPrefix : string
- Cache key prefix to use, based on the application title, to prevent key clashes between different apps using the same cache provider.
- $logger : Logger
- Trace logger.
Methods
- __construct() : mixed
- Constructor.
- check() : bool
- Check the cache for the existance of the given $key. Returns true if the $key is set, false otherwise.
- delete() : void
- Attempt to delete the value from the cache for the given $key.
- get() : mixed
- Attempt to get the value from the cache for the given $key.
- set() : void
- Attempt to set the value in the cache for the given $key. Old values on the same key will be overwritten.
Properties
$appPrefix
Cache key prefix to use, based on the application title, to prevent key clashes between different apps using the same cache provider.
private
string
$appPrefix
Tags
$logger
Trace logger.
private
static Logger
$logger
= null
Tags
Methods
__construct()
Constructor.
public
__construct() : mixed
Tags
check()
Check the cache for the existance of the given $key. Returns true if the $key is set, false otherwise.
public
check(mixed $key) : bool
Parameters
- $key : mixed
Return values
booldelete()
Attempt to delete the value from the cache for the given $key.
public
delete(mixed $key) : void
Parameters
- $key : mixed
get()
Attempt to get the value from the cache for the given $key.
public
get(mixed $key) : mixed
Parameters
- $key : mixed
set()
Attempt to set the value in the cache for the given $key. Old values on the same key will be overwritten.
public
set(mixed $key, mixed $value[, mixed $expiry = 0 ]) : void
Parameters
- $key : mixed
- $value : mixed
- $expiry : mixed = 0
-
Optional, some cache implementations will support an expiry value in seconds.