ICache
This interface defines method for accessing the file based user cache.
Tags
Table of Contents
- 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
- remove() : bool
- Remove an item from the user cache
- set() : bool
- Set a value in the user cache
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
bool —get()
Get a value from the user cache
public
get(string $key) : mixed
Parameters
- $key : string
Tags
Return values
mixed —hasKey()
Check if a value is set in the user cache
public
hasKey(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —remove()
Remove an item from the user cache
public
remove(string $key) : bool
Parameters
- $key : string
Tags
Return values
bool —set()
Set a value in the user cache
public
set(string $key, mixed $value, int $ttl) : bool
Parameters
- $key : string
- $value : mixed
- $ttl : int
-
Time To Live in seconds. Defaults to 606024