get()
get(string $key, mixed $default = null) : mixed
Fetches a value from the cache.
Parameters
string | $key | The unique key of this item in the cache. |
mixed | $default | Default value to return if the key does not exist. |
Throws
- \Psr\SimpleCache\InvalidArgumentException
MUST be thrown if the $key string is not a legal value.
Returns
mixed —The value of the item from the cache, or $default in case of cache miss.