protected deleteValue ( $key ) : boolean | ||
return | boolean | if no error happens during deletion |
protected function deleteValue($key)
{
if (!$this->_cacheInitialized) {
$this->initializeCache();
}
try {
$command = $this->getDbConnection()->createCommand("DELETE FROM {$this->_cacheTable} WHERE itemkey=:key");
$command->bindValue(':key', $key, \PDO::PARAM_STR);
$command->execute();
return true;
} catch (\Exception $e) {
$this->initializeCache(true);
$command->execute();
return true;
}
}