Merge pull request #1827 from neoascetic/flush_file_cache
Ability to flush file-based cache storage
This commit is contained in:
commit
778a97b319
|
@ -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.'*'));
|
||||
}
|
||||
|
||||
}
|
|
@ -93,9 +93,9 @@ public function forget($key)
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function flush()
|
||||
{
|
||||
$this->redis->flushdb();
|
||||
}
|
||||
public function flush()
|
||||
{
|
||||
$this->redis->flushdb();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue