Commit 0d99d132 authored by Pavel Puchkin's avatar Pavel Puchkin

Ability to flush file-based cache storage

parent 92e3ae47
...@@ -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