Метод | Описание | |
---|---|---|
get ( string | integer $key, callable $callback = null, mixed $default = null ) : mixed | Fetches a value from the cache, with the option of calculating on miss | |
invalidate ( string | integer $key ) : void | Forcefully invalidates the value associated with the given key. | |
put ( string | integer $key, mixed $value ) : void | Prime the cache to a specific value. |
public get ( string | integer $key, callable $callback = null, mixed $default = null ) : mixed | ||
$key | string | integer | A plain string ID for the cache entry |
$callback | callable | Logic for calculating the cache entry on miss |
$default | mixed | Default value returned if the value is missing and no callback is provided |
Результат | mixed | The cache value or the $default if no value and no callable |