Skip to content

Commit 8d3b0c0

Browse files
author
Dale Sikkema
committed
MAGETWO-43787: cache:clean command doesn't clear Varnish cache
- use _nosid route param so session does not get invoked when building url
1 parent f666d00 commit 8d3b0c0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/PageCache/Model/Cache/Server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getUris()
6060
$httpHost = $this->request->getHttpHost();
6161
$servers[] = $httpHost ?
6262
UriFactory::factory('')->setHost($httpHost)->setPort(self::DEFAULT_PORT)->setScheme('http') :
63-
UriFactory::factory($this->urlBuilder->getUrl('*'))
63+
UriFactory::factory($this->urlBuilder->getUrl('*', ['_nosid' => true])) // Don't use SID in building URL
6464
->setScheme('http')
6565
->setPath(null)
6666
->setQuery(null);

app/code/Magento/PageCache/Test/Unit/Model/Cache/ServerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testGetUris(
6464
->willReturn($httpHost);
6565
$this->urlBuilderMock->expects($this->exactly($getUrlCallCtr))
6666
->method('getUrl')
67-
->with('*')
67+
->with('*', ['_nosid' => true])
6868
->willReturn($url);
6969

7070
$uris = [];

0 commit comments

Comments
 (0)