Skip to content

Commit

Permalink
Fix PageCache: async rendering of blocks can corrupt layout cache mag…
Browse files Browse the repository at this point in the history
…ento#8554 magento#9050 magento#9560

Adapted PageCache and Framework tests
  • Loading branch information
adrian-martinez-interactiv4 committed Sep 22, 2017
1 parent 516b529 commit efa3edb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/Magento/Framework/View/Model/Layout/Merge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()))));
}
}

0 comments on commit efa3edb

Please sign in to comment.