Commit 778a97b3 by Taylor Otwell

Merge pull request #1827 from neoascetic/flush_file_cache

Ability to flush file-based cache storage
parents 92e3ae47 0d99d132
...@@ -97,4 +97,14 @@ class File extends Driver { ...@@ -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.'*'));
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment