CacheProviderAPC implements CacheProviderInterface
An implementation of the CacheProviderInterface interface that uses APC/APCu as the target store.
Tags
Interfaces, Classes and Traits
- CacheProviderInterface
- An interface that contains the methods for a cache implementation for storing business objects and other less complex values.
Table of Contents
- $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.
- __construct() : mixed
- Constructor.
- delete() : mixed
- 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() : mixed
- 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
Return values
mixed —delete()
Attempt to delete the value from the cache for the given $key.
public
delete(mixed $key) : mixed
Parameters
- $key : mixed
Return values
mixed —get()
Attempt to get the value from the cache for the given $key.
public
get(mixed $key) : mixed
Parameters
- $key : mixed
Return values
mixed —The expected value from the cache, boolean false otherwise
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) : mixed
Parameters
- $key : mixed
- $value : mixed
- $expiry : mixed
-
Optional, some cache implementations will support an expiry value in seconds.