Ability to flush file-based cache storage
This commit is contained in:
12
laravel/cache/drivers/file.php
vendored
12
laravel/cache/drivers/file.php
vendored
@@ -97,4 +97,14 @@ class File extends Driver {
|
||||
if (file_exists($this->path.$key)) @unlink($this->path.$key);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* Flush the entire cache.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function flush()
|
||||
{
|
||||
array_map('unlink', glob($this->path.'*'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
12
laravel/cache/drivers/redis.php
vendored
12
laravel/cache/drivers/redis.php
vendored
@@ -87,15 +87,15 @@ class Redis extends Driver {
|
||||
{
|
||||
$this->redis->del($key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Flush the entire cache.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function flush()
|
||||
{
|
||||
$this->redis->flushdb();
|
||||
}
|
||||
public function flush()
|
||||
{
|
||||
$this->redis->flushdb();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user