Methods summary
abstract public
boolean
|
#
has( string $key )
Determine if an item exists in the cache.
Determine if an item exists in the cache.
Parameters
Returns
boolean
|
public
mixed
|
#
get( string $key, mixed $default = null )
Get an item from the cache.
Get an item from the cache.
$name = Cache::driver('name');
$name = Cache::get('name', 'Taylor');
Parameters
- $key
string $key
- $default
mixed $default
Returns
mixed
|
abstract protected
mixed
|
#
retrieve( string $key )
Retrieve an item from the cache driver.
Retrieve an item from the cache driver.
Parameters
Returns
mixed
|
abstract public
|
#
put( string $key, mixed $value, integer $minutes )
Write an item to the cache for a given number of minutes.
Write an item to the cache for a given number of minutes.
Cache::put('name', 'Taylor', 15);
Parameters
- $key
string $key
- $value
mixed $value
- $minutes
integer $minutes
|
public
mixed
|
#
remember( string $key, mixed $default, integer $minutes, string $function = 'put' )
Get an item from the cache, or cache and return the default value.
Get an item from the cache, or cache and return the default value.
$name = Cache::remember('name', 'Taylor', 15);
$count = Cache::remember('count', function() { return User::count(); }, 15);
Parameters
- $key
string $key
- $default
mixed $default
- $minutes
integer $minutes
- $function
string $function
Returns
mixed
|
public
mixed
|
#
sear( string $key, mixed $default )
Get an item from the cache, or cache the default value forever.
Get an item from the cache, or cache the default value forever.
Parameters
- $key
string $key
- $default
mixed $default
Returns
mixed
|
abstract public
|
#
forget( string $key )
Delete an item from the cache.
Delete an item from the cache.
Parameters
|
protected
integer
|
#
expiration( integer $minutes )
Get the expiration time as a UNIX timestamp.
Get the expiration time as a UNIX timestamp.
Parameters
Returns
integer
|