ICache
in
This interface defines method for accessing the file based user cache.
Tags
Table of Contents
Constants
- DEFAULT_TTL = 24 * 60 * 60
Methods
- clear() : bool
- Clear the user cache of all entries starting with a prefix
- get() : mixed
- Get a value from the user cache
- hasKey() : bool
- Check if a value is set in the user cache
- isAvailable() : bool
- Check if the cache implementation is available
- remove() : bool
- Remove an item from the user cache
- set() : bool
- Set a value in the user cache
Constants
DEFAULT_TTL
public
mixed
DEFAULT_TTL
= 24 * 60 * 60
Tags
Methods
clear()
Clear the user cache of all entries starting with a prefix
public
clear([string $prefix = '' ]) : bool
Parameters
- $prefix : string = ''
-
(optional)
Tags
Return values
boolget()
Get a value from the user cache
public
get(string $key) : mixed
Parameters
- $key : string
Tags
hasKey()
Check if a value is set in the user cache
public
hasKey(string $key) : bool
Directly read from GET to prevent race conditions
Parameters
- $key : string
Tags
Return values
boolisAvailable()
Check if the cache implementation is available
public
static isAvailable() : bool
Tags
Return values
boolremove()
Remove an item from the user cache
public
remove(string $key) : bool
Parameters
- $key : string
Tags
Return values
boolset()
Set a value in the user cache
public
set(string $key, mixed $value[, int $ttl = 0 ]) : bool
Parameters
- $key : string
- $value : mixed
- $ttl : int = 0
-
Time To Live in seconds. Defaults to 606024