lithium\storage\cache\adapter\File::clear()
Overrides
lithium\storage\cache\Adapter::clear()
Clears entire cache by flushing it. Please note that a scope - in case one is set - is not honored.
The operation will continue to remove keys even if removing one single key fails, clearing thoroughly as possible.
Returns
booleantrue on successful clearing, false if failed partially or entirely.
Source
public function clear() {
$result = true;
foreach (new DirectoryIterator($this->_config['path']) as $file) {
if (!$file->isFile()) {
continue;
}
$result = $this->_delete($file->getBasename()) && $result;
}
return $result;
}