Cache
Cache management class.
Table of Contents
$engine | The engine used for cache | FileCache|APCAdapter|MemcacheAdapter |
---|---|---|
__construct() | Default constructor | mixed |
clear() | Cleans all the cache contents | bool |
delete() | Deletes the contents from the cache associated to $key | bool |
get() | Returns the contents in the cache associated to $key | mixed |
set() | Saves contents in the cache and associates them to $key | bool |
loadMemcache() | Loads memcache engine | mixed |
Properties
$engine
The engine used for cache
private
static FileCache|APCAdapter|MemcacheAdapter
$engine
Methods
__construct()
Default constructor
public
__construct(
)
: mixed
Return values
mixedclear()
Cleans all the cache contents
public
clear(
)
: bool
Return values
booldelete()
Deletes the contents from the cache associated to $key
public
delete(
$key :
string
)
: bool
Parameters
- $key : string
Return values
boolget()
Returns the contents in the cache associated to $key
public
get(
$key :
string
)
: mixed
Parameters
- $key : string
Return values
mixedset()
Saves contents in the cache and associates them to $key
public
set(
$key :
string
, $content :
mixed
[, $expire :
int
= 3600 ]
)
: bool
Parameters
- $key : string
- $content : mixed
- $expire : int = 3600
Return values
boolloadMemcache()
Loads memcache engine
private
loadMemcache(
)
: mixed