public function flush()
{
if (!$this->_cacheInitialized) {
$this->initializeCache();
}
try {
$command = $this->getDbConnection()->createCommand("DELETE FROM {$this->_cacheTable}");
$command->execute();
} catch (\Exception $e) {
try {
$this->initializeCache(true);
$command->execute();
return true;
} catch (\Exception $e) {
return false;
}
}
return true;
}