Elimina un valor en cache asociado a una clave
@param string $key
503979
public function delete($key) {
        $filename = $this->getFileName($key);
        if (file_exists($filename)) {
            return unlink($filename);
        }else{
            return false;
        }
    }
722738
private function getSchemaCache($key)
    {
        if (isset($this->model_schema_cache[$key])) {
            return $this->model_schema_cache[$key];
        }

        return false;
    }
1270023
public function unset(string $key)
    {
        if (array_key_exists($key, $this->input)) {
            unset($this->input[$key]);
            unset($this->cache[$key]);
        }

        $item = &$this->input;

        foreach (explode('.', $key) as $segment) {
            if (! isset($item[$segment])) {
                return;
            }
            if (! is_array($item[$segment])) {
                unset($item[$segment]);
                break;
            }
            $item = &$item[$segment];
        }

        unset($this->cache[$key]);
    }
1075771
protected function deleteValue($key)
    {
        $this->db->getCollection($this->cacheCollection)->remove(['id' => $key]);
        return true;
    }
1289834
public function grabValueFromMemcached($key)
    {
        $value = $this->memcache->get($key);
        $this->debugSection("Value", $value);

        return $value;
    }
55778
public function remove($key) {
        $key = $this->conf['keyPrefix'] . $key;
        X::logger()->trace("MCache remove $key");
        return $this->cache->delete($key);
    }
586038
public static function clear($key)
    {
        $that = new static($key);

        if ($that->isCached()) {

            $deletionSuccess = unlink($that->filePath());
            
            if(!$deletionSuccess) {
                throw new CacheException(sprintf("Could not delete file '%s'", $this->filePath()));
            }
        }
    }
459915
protected function lru($key)
    {
        // move key that has just been used to last position in the array
        $value = $this->items[$key];
        unset($this->items[$key]);
        $this->items[$key] = $value;
    }
1018717
public function isCached($key) {
    if (false != $this->_loadCache()) {
      $cachedData = $this->_loadCache();
      return isset($cachedData[$key]['data']);
    }
  }
272977
function set($key, $data)
    {
        $this->cache[$key]         = $data;
        $this->cache_changes[$key] = true;
    }
1247172
public function forget($key)
        {
            $this->_cleanCache();
            $res = Data::query('cache', 'key = ' . $key . ' && namespace = ' . $this->namespace);
            if (count($res)) {
                $obj = Data::getObject(current($res));
                $del = Data::delete('cache', $obj->getId());
            }
        }
1320336
public static function getFromCache($key)
  {
    static::initialize();
    $v = self::$cm->getFromCache($key);
    return $v ? $v['value'] : null;
  }
914626
private function evaluateAndGet($key)
    {
        $valTO = $this->evaluate($key);
        $this->setValue($key, $valTO);

        if ($valTO->fails()) {
            $this->err_num++;
        }
    }
1061627
public function isInCache($key)
  {
    $value = $this->memcache->get($this->buildMKey($key));
    if ($value) {
      return true;
    }
    return false;
  }
938627
private function clearCache($key)
    {
        $allowedCacheKeys = [
            self::CACHE_KEY_CSS,
            self::CACHE_KEY_SELECTOR,
            self::CACHE_KEY_XPATH,
            self::CACHE_KEY_CSS_DECLARATIONS_BLOCK,
            self::CACHE_KEY_COMBINED_STYLES,
        ];
        if (!in_array($key, $allowedCacheKeys, true)) {
            throw new \InvalidArgumentException('Invalid cache key: ' . $key, 1391822035);
        }

        $this->caches[$key] = [];
    }
76028
public function deleteValue($key)
    {
        $this->ssdbHandle->hdel($this->cache_keys_hash, $key);
        return $this->ssdbHandle->del($key);
    }
941569
public function getValue(string $key)
    {
        if (!Config::get('activateDbCache')) {
            return false;
        }

        // clean expired values at first (self-purification)
        $this->database->prepare('DELETE FROM tl_db_cache WHERE expiration < ?')->execute(time());

        $result = $this->database->prepare('SELECT * FROM tl_db_cache WHERE cacheKey = ?')->execute($key);

        if ($result->numRows > 0) {
            return $result->cacheValue;
        }

        return false;
    }