From 07f4c535c0e9352be8462ec35c7c7ed09aaa1550 Mon Sep 17 00:00:00 2001 From: Yaroslav Rogoza Date: Mon, 4 Jun 2018 18:45:08 +0200 Subject: [PATCH] Added additional headers for avoid customer data caching --- app/code/Magento/Customer/Controller/Section/Load.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Customer/Controller/Section/Load.php b/app/code/Magento/Customer/Controller/Section/Load.php index e99dcdb2cf96..dbe640ef2a36 100644 --- a/app/code/Magento/Customer/Controller/Section/Load.php +++ b/app/code/Magento/Customer/Controller/Section/Load.php @@ -61,6 +61,8 @@ public function execute() { /** @var \Magento\Framework\Controller\Result\Json $resultJson */ $resultJson = $this->resultJsonFactory->create(); + $resultJson->setHeader('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store', true); + $resultJson->setHeader('Pragma', 'no-cache', true); try { $sectionNames = $this->getRequest()->getParam('sections'); $sectionNames = $sectionNames ? array_unique(\explode(',', $sectionNames)) : null;