Skip to content

Commit bd37cbf

Browse files
authored
Merge pull request magento#4549 from magento-performance/MC-18718
MC-18718: store switcher set not unique version
2 parents fc7fb0d + 56104ef commit bd37cbf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/code/Magento/Store/Model/StoreSwitcher/ManagePrivateContent.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ public function __construct(
3838
}
3939

4040
/**
41+
* Update version of private content on each store switch.
42+
*
4143
* @param StoreInterface $fromStore store where we came from
4244
* @param StoreInterface $targetStore store where to go to
4345
* @param string $redirectUrl original url requested for redirect after switching
46+
*
4447
* @return string redirect url
4548
* @throws CannotSwitchStoreException
4649
*/
@@ -54,7 +57,7 @@ public function switch(StoreInterface $fromStore, StoreInterface $targetStore, s
5457
->setHttpOnly(false);
5558
$this->cookieManager->setPublicCookie(
5659
\Magento\Framework\App\PageCache\Version::COOKIE_NAME,
57-
'should_be_updated',
60+
\uniqid('updated-', true),
5861
$publicCookieMetadata
5962
);
6063
} catch (\Exception $e) {

0 commit comments

Comments
 (0)