Added proper cache::forever implementations to each driver.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
12
laravel/cache/drivers/file.php
vendored
12
laravel/cache/drivers/file.php
vendored
@@ -73,6 +73,18 @@ class File extends Driver {
|
||||
file_put_contents($this->path.$key, $value, LOCK_EX);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an item from the cache.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user