Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions
web/vendor/symfony/http-kernel/HttpCache

View file

@ -314,6 +314,26 @@ class Store implements StoreInterface
return unserialize($entries);
}
/**
* Purges data for the given URL.
*
* This method purges both the HTTP and the HTTPS version of the cache entry.
*
* @param string $url A URL
*
* @return bool true if the URL exists with either HTTP or HTTPS scheme and has been purged, false otherwise
*/
public function purge($url)
{
$http = preg_replace('#^https:#', 'http:', $url);
$https = preg_replace('#^http:#', 'https:', $url);
$purgedHttp = $this->doPurge($http);
$purgedHttps = $this->doPurge($https);
return $purgedHttp || $purgedHttps;
}
/**
* Purges data for the given URL.
*
@ -321,10 +341,9 @@ class Store implements StoreInterface
*
* @return bool true if the URL exists and has been purged, false otherwise
*/
public function purge($url)
private function doPurge($url)
{
$key = $this->getCacheKey(Request::create($url));
if (isset($this->locks[$key])) {
flock($this->locks[$key], LOCK_UN);
fclose($this->locks[$key]);