Delete an item from the cache by its unique key.

@param string $key The unique cache key of the item to delete.

@return bool True if the item was successfully removed. False if there was an error.
194659
public function delete($key): bool
    {
        if ($this->enabled) {
            $realKey = $this->adjustKey($key);
            return $this->cacheDelete($realKey);
        }
        return false;
    }
306821
protected function deleteValue($key)
    {
        $this->db->createCommand()
            ->delete($this->cacheTable, ['id' => $key])
            ->execute();

        return true;
    }
230205
public function forget($key)
    {
        if ($this->files->exists($file = $this->path($key))) {
            return $this->files->delete($file);
        }

        return false;
    }
1060716
public function forget(string $key): bool
    {
        $key = $this->hashKey($key);
        if (\array_key_exists($key, $this->cache)) {
            unset($this->cache[$key]);
            return true;
        }
        return false;
    }
873073
public function delete($key)
    {
        try {
            $this->get($key);
        } catch (KeyNotFoundException $e) {
            return false;
        }

        unset($this->store[$key]);

        return true;
    }
55778
public function remove($key) {
        $key = $this->conf['keyPrefix'] . $key;
        X::logger()->trace("MCache remove $key");
        return $this->cache->delete($key);
    }
722425
public function delete(string $key): bool
    {
        Redis::delete(self::PREFIX . $key);
        return parent::delete($key);
    }
1295908
public function delete($key)
    {
        $query = sprintf('DELETE FROM `%s` WHERE `key` = :key', $this->table);
        $stmt = $this->pdo->prepare($query);

        return $stmt->execute(array(
            ':'.ConstProviderInterface::CACHE_PARAM_KEY => $key,
        ));
    }
19196
public function delete($key)
    {

        $deleted = false;

        $catalog = \array_keys($this->getKeys());
        foreach ($catalog as $k) {

            if ($k == $key) {
                unset($this->hash[$key]);
                if ($delete) {
                    $this->catalogKeyDelete($k);
                    $deleted = true;
                }
            }
        }

        return $deleted;
    }
864295
public function delete($key): bool
    {
        if ($this->has($key)) {
            $this->unset($key);
            return true;
        }

        return false;
    }
877935
public function delete($key)
    {
        if (!$this->requireProvider("Deleting key " . $key)) return false;

        return $this->cacheProvider->delete($key);
    }
932462
public function remove($key) {
        if ($this->exists($key)) {
            $key = $this->_encrypt($key);
            $this->_memcached->delete($key);
            
            return true;
        }
        
        return false;
    }
747575
public function remove ($key) {
        if (!$this->getConnection ()->getClient ()->zrem ($this->name , $key)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        return true;
    }
311734
public function delete($key)
    {
        if ($this->redis->hDel($this->prefix, $key) > 0) {
            return true;
        }
        return false;
    }
1076281
public function delete($key)
    {
        if (!$this->enabled)
            return true;

        $this->Logger->debug("Delete key: {$key}");
        return $this->db->queryExec("DELETE FROM cache WHERE key='" . $this->key($key). "'");
    }
1277408
public function delete($key)
    {
        $res = $this->deleteFile($key);
        if ($res === false) {
            return false;
        }

        return $this->deleteStore($key);
    }
1197876
public function delete($key) 
    {
        if(empty($key)) {
            return false;
        }
    
        $this->stats['execTimes'] ++;
        
        $path = $this->getCachePath($key);
        $this->waitUnlock($key);
        $this->lock($key);
        $this->obj->delete($path);        
        $this->unlock($key);
    }