AbstractBackend implements BackendInterface, LoggerAwareInterface uses LoggerAwareTrait
AbstractYes
An abstract caching backend
Table of Contents
Interfaces
- BackendInterface
- A contract for a Cache Backend
- LoggerAwareInterface
Properties
- $cacheIdentifier : string
- $defaultLifetime : int
- Default lifetime of a cache entry in seconds
Methods
- __construct() : mixed
- setCache() : void
- Sets a reference to the cache frontend which uses this backend
- setDefaultLifetime() : void
- Sets the default lifetime for this cache backend
Properties
$cacheIdentifier
protected
string
$cacheIdentifier
$defaultLifetime
Default lifetime of a cache entry in seconds
protected
int
$defaultLifetime
= 3600
Methods
__construct()
public
__construct([array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $options : array<string|int, mixed> = []
-
Configuration options - depends on the actual backend
setCache()
Sets a reference to the cache frontend which uses this backend
public
setCache(FrontendInterface $cache) : void
Parameters
- $cache : FrontendInterface
-
The frontend for this backend
setDefaultLifetime()
Sets the default lifetime for this cache backend
public
setDefaultLifetime(int $defaultLifetime) : void
Parameters
- $defaultLifetime : int
-
Default lifetime of this cache backend in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.
Misused for testing purposes.