Added Cache::forever method to cache something for five years.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
parent
cb5fdeaed6
commit
873dd1534c
|
@ -53,6 +53,18 @@ abstract protected function retrieve($key);
|
|||
*/
|
||||
abstract public function put($key, $value, $minutes);
|
||||
|
||||
/**
|
||||
* Write an item to the cache for five years.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
public function forever($key, $value)
|
||||
{
|
||||
return $this->put($key, $value, 2628000);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an item from the cache, or cache and return the default value.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue