Added proper cache::forever implementations to each driver.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
14
laravel/cache/drivers/redis.php
vendored
14
laravel/cache/drivers/redis.php
vendored
@@ -60,11 +60,23 @@ class Redis extends Driver {
|
||||
*/
|
||||
public function put($key, $value, $minutes)
|
||||
{
|
||||
$this->redis->set($key, serialize($value));
|
||||
$this->forever($key, $value);
|
||||
|
||||
$this->redis->expire($key, $minutes * 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write an item to the cache that lasts forever.
|
||||
*
|
||||
* @param string $key
|
||||
* @param mixed $value
|
||||
* @return void
|
||||
*/
|
||||
public function forever($key, $value)
|
||||
{
|
||||
$this->redis->set($key, serialize($value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete an item from the cache.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user