Prado\Caching\TDbCache::deleteValue PHP Method

deleteValue() protected method

Deletes a value with the specified key from cache This is the implementation of the method declared in the parent class.
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;
        }
    }