You are here

public function Store::purge in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/HttpCache/Store.php \Symfony\Component\HttpKernel\HttpCache\Store::purge()

Purges data for the given URL.

Parameters

string $url A URL:

Return value

bool true if the URL exists and has been purged, false otherwise

Overrides StoreInterface::purge

File

vendor/symfony/http-kernel/HttpCache/Store.php, line 305

Class

Store
Store implements all the logic for storing cache metadata (Request and Response headers).

Namespace

Symfony\Component\HttpKernel\HttpCache

Code

public function purge($url) {
  if (is_file($path = $this
    ->getPath($this
    ->getCacheKey(Request::create($url))))) {
    unlink($path);
    return true;
  }
  return false;
}