Merge pull request #1827 from neoascetic/flush_file_cache

Ability to flush file-based cache storage
This commit is contained in:
Taylor Otwell
2013-03-28 17:50:00 -07:00
2 changed files with 17 additions and 7 deletions

View File

@@ -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.'*'));
}
} }