From efa3edbc87c01316ea7b360b74d9a161991432af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Mart=C3=ADnez?= Date: Fri, 22 Sep 2017 14:35:18 +0200 Subject: [PATCH] Fix PageCache: async rendering of blocks can corrupt layout cache #8554 #9050 #9560 Adapted PageCache and Framework tests --- lib/internal/Magento/Framework/View/Model/Layout/Merge.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php index e08ae3e89f6ea..b804750d5e55f 100644 --- a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php +++ b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php @@ -727,7 +727,7 @@ protected function _loadFileLayoutUpdatesXml() $updateFiles = array_merge($updateFiles, $this->pageLayoutFileSource->getFiles($theme, '*.xml')); $useErrors = libxml_use_internal_errors(true); foreach ($updateFiles as $file) { - /** @var $fileReader \Magento\Framework\Filesystem\File\Read */ + /** @var $fileReader \Magento\Framework\Filesystem\File\Read */ $fileReader = $this->readFactory->create($file->getFilename(), DriverPool::FILE); $fileStr = $fileReader->readAll($file->getName()); $fileStr = $this->_substitutePlaceholders($fileStr); @@ -926,6 +926,7 @@ public function getScope() */ public function getCacheId() { - return $this->generateCacheId(md5(implode('|', array_merge($this->getHandles(), $this->layoutCacheKey->getCacheKeys())))); + return $this->generateCacheId(md5(implode('|', + array_merge($this->getHandles(), $this->layoutCacheKey->getCacheKeys())))); } }