diff --git a/laravel/cache/drivers/file.php b/laravel/cache/drivers/file.php index c37520ea..31ef9a4e 100644 --- a/laravel/cache/drivers/file.php +++ b/laravel/cache/drivers/file.php @@ -97,4 +97,14 @@ public function forget($key) if (file_exists($this->path.$key)) @unlink($this->path.$key); } -} \ No newline at end of file + /** + * Flush the entire cache. + * + * @return void + */ + public function flush() + { + array_map('unlink', glob($this->path.'*')); + } + +} diff --git a/laravel/cache/drivers/redis.php b/laravel/cache/drivers/redis.php index f0a71d07..ebc1c08f 100644 --- a/laravel/cache/drivers/redis.php +++ b/laravel/cache/drivers/redis.php @@ -87,15 +87,15 @@ public function forget($key) { $this->redis->del($key); } - + /** * Flush the entire cache. - * + * * @return void */ - public function flush() - { - $this->redis->flushdb(); - } + public function flush() + { + $this->redis->flushdb(); + } }