protected function doFlush()
{
// Clear Doctrine's folder.
$result = parent::doFlush();
if ($this->filesystem instanceof AggregateFilesystemInterface) {
// Clear our own cache folder.
$this->flushDirectory($this->filesystem->getFilesystem('cache')->getDir('/development'));
$this->flushDirectory($this->filesystem->getFilesystem('cache')->getDir('/production'));
$this->flushDirectory($this->filesystem->getFilesystem('cache')->getDir('/profiler'));
// Clear the thumbs folder.
$this->flushDirectory($this->filesystem->getFilesystem('web')->getDir('/thumbs'));
}
return $result;
}