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
commit 778a97b319
2 changed files with 17 additions and 7 deletions

View File

@ -97,4 +97,14 @@ public function forget($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.'*'));
}
}

View File

@ -93,9 +93,9 @@ public function forget($key)
*
* @return void
*/
public function flush()
{
$this->redis->flushdb();
}
public function flush()
{
$this->redis->flushdb();
}
}