CacheInterface
in
Interface for a cache backend.
Tags
Table of Contents
- get() : string|null
- Returns the value for a key.
- has() : bool
- Checks if the cache has a value for a key.
- remove() : mixed
- Removes a value from the cache.
- set() : mixed
- Sets a value in the cache.
Methods
get()
Returns the value for a key.
public
get(string $key) : string|null
Parameters
- $key : string
-
A unique key
Return values
string|null —The value in the cache
has()
Checks if the cache has a value for a key.
public
has(string $key) : bool
Parameters
- $key : string
-
A unique key
Return values
bool —Whether the cache has a value for this key
remove()
Removes a value from the cache.
public
remove(string $key) : mixed
Parameters
- $key : string
-
A unique key
Return values
mixed —set()
Sets a value in the cache.
public
set(string $key, string $value) : mixed
Parameters
- $key : string
-
A unique key
- $value : string
-
The value to cache