Ability to flush file-based cache storage
This commit is contained in:
parent
92e3ae47bb
commit
0d99d13298
|
@ -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.'*'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -87,15 +87,15 @@ public function forget($key)
|
|||
{
|
||||
$this->redis->del($key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Flush the entire cache.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function flush()
|
||||
{
|
||||
$this->redis->flushdb();
|
||||
}
|
||||
public function flush()
|
||||
{
|
||||
$this->redis->flushdb();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue