Supprime une valeur du cache

@param  String $key  Clé à supprimer
4514
public function deleteFromCache($key)
  {
    $file = $this->cachePath . $this->getEncodedKey($key);
    if (file_exists($file)) {
      unlink($file);
    }
  }
373567
public function delete($key) {
    $directory = $this->environment->getHooksDirectory();
    $data_file = "$directory/{$key}_processed.php";

    if (file_exists($data_file)) {
      unlink($data_file);
    }
  }
625021
public function purge($key)
    {
        $cacheFile = $this->getCachePath($key);

        clearstatcache(true, $cacheFile);
        if (file_exists($cacheFile)) {
            unset($cacheFile);

            return true;
        }

        return false;
    }
283670
public function clear(string $key = ''): bool {
		if ($key === '') {
			$this->recursiveDeleteDirectory($this->storageCachePath);
			return true;
		}
		$cacheDir = $this->storageCachePath . $key;
		$dirName  = dirname($cacheDir);
		$find     = str_replace($dirName . '/', '', $cacheDir);
		if (is_dir($dirName) && $dirArray = scandir($dirName)) {
			foreach ($dirArray as $k => $v) {
				if ($v !== '.' && $v !== '..') {
					if (is_dir($dirName . '/' . $v) && (strpos($v, $find) === 0)) {
						$this->recursiveDeleteDirectory($dirName . '/' . $v);
						rmdir($dirName . '/' . $v);
					}
					elseif (strpos($v, $find) === 0) {
						unlink($dirName . '/' . $v);
					}
				}
			}
		}
		return true;
	}
397054
public function delete($key){
		if(DEBUG_MODE){
			BDebug::message('[Memcached]: Delete key('.$key.')');
			}
		$mc=$this->getMemcached();
		if(empty($mc))return false;
		$this->queries_delete_count++;
		return $mc->delete($key);
		}
772277
public function forget(string $key)
    {
        $cacheKey = $this->cacheKeys[$key] ?? null;
        if (!empty($cacheKey)) {
            Cache::forget($cacheKey);
        }
    }
965554
public static function removeFromCache($key)
    {
        $fullKey = static::makeCacheKey($key);
        if (!Cache::forget($fullKey)) {
            return false;
        }

        static::removeKeys($key);

        return true;
    }
10592
public function get($key)
    {
        $file = $this->cacheDir . $this->getDir($key) . $this->getFile($key);
        if (file_exists($file) && is_readable($file)) {
            if (filemtime($file) > time()) {
                return file_get_contents($file);
            }
        }

        return false;
    }
575887
public function delete($key)
    {
        $cache_file = $this->path($key);
        if (file_exists($cache_file)) {
            $unlink_result = unlink($cache_file);
            if ($unlink_result === false) return false;
        }

        return true;
    }
685932
private function cacheForget($key)
    {
        foreach (Arr::wrap($key) as $value) {
            Cache::forget($value);
        }
    }
1207596
protected function cacheFile(string $key): string
    {
        return $this->path . '/' . $this->prefix . $key . $this->extension;
    }
869400
public function remove($key){
        return ($this->memcache) ? $this->memcache->remove($this->prefix . '_' . $key) : false;
    }
354388
public function remove($key)
    {
        $this->initializeOnDemand();

        if ($this->has($key) && $this->cacheMapper->delete($key)) {
            unset($this->cache[$key]);
            return true;
        } else {
            return false;
        }
    }
340158
public function delete($key)
    {
        if (true === array_key_exists($key, $this->cache)) {
            unset($this->cache[$key]);

            return true;
        }

        return false;
    }
269811
public function remove($key)
    {
        $key = str_replace('_', '-', strtolower($key));

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

        if ('cache-control' === $key) {
            $this->cacheControl = array();
        }
    }
41403
public function sFlush($key) {
        $this->_redis->multi();
        $this->_redis->sMembers($key);
        $this->_redis->del($key);
        return $this->_redis->exec()[0];
    }
1055479
protected function cacheFile(string $key): string
	{
		return $this->cachePath . '/' . str_replace(['/', ':'], '_', $this->getPrefixedKey($key)) . '.php';
	}