Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0249e87

Browse files
committed
purge both http and https from http cache store
1 parent5a38804 commit0249e87

File tree

1 file changed

+18
-2
lines changed
  • src/Symfony/Component/HttpKernel/HttpCache

1 file changed

+18
-2
lines changed

‎src/Symfony/Component/HttpKernel/HttpCache/Store.php‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,30 @@ private function getMetadata($key)
317317
/**
318318
* Purges data for the given URL.
319319
*
320+
* This method purges both the HTTP and the HTTPS version of the cache entry.
321+
*
320322
* @param string $url A URL
321323
*
322-
* @return bool true if the URL exists and has been purged, false otherwise
324+
* @return bool true if the URL existswith either HTTP or HTTPS schemeand has been purged, false otherwise
323325
*/
324326
publicfunctionpurge($url)
325327
{
326-
$key =$this->getCacheKey(Request::create($url));
328+
$http =preg_replace('#^https#','http',$url);
329+
$https =preg_replace('#^http#','https',$url);
327330

331+
return$this->doPurge($http) ||$this->doPurge($https);
332+
}
333+
334+
/**
335+
* Purges data for the given URL.
336+
*
337+
* @param string $url A URL
338+
*
339+
* @return bool true if the URL exists and has been purged, false otherwise
340+
*/
341+
privatefunctiondoPurge($url)
342+
{
343+
$key =$this->getCacheKey(Request::create($url));
328344
if (isset($this->locks[$key])) {
329345
flock($this->locks[$key],LOCK_UN);
330346
fclose($this->locks[$key]);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp