Ability to flush file-based cache storage
This commit is contained in:
10
laravel/cache/drivers/file.php
vendored
10
laravel/cache/drivers/file.php
vendored
@@ -97,4 +97,14 @@ class File extends Driver {
|
|||||||
if (file_exists($this->path.$key)) @unlink($this->path.$key);
|
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.'*'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
8
laravel/cache/drivers/redis.php
vendored
8
laravel/cache/drivers/redis.php
vendored
@@ -93,9 +93,9 @@ class Redis extends Driver {
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function flush()
|
public function flush()
|
||||||
{
|
{
|
||||||
$this->redis->flushdb();
|
$this->redis->flushdb();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user