Skip to content

Commit 3bdfa1b

Browse files
Fix PageCache: async rendering of blocks can corrupt layout cache #8554
1 parent c3cb46a commit 3bdfa1b

File tree

1 file changed

+7
-0
lines changed
  • app/code/Magento/PageCache/Controller

1 file changed

+7
-0
lines changed

app/code/Magento/PageCache/Controller/Block.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ abstract class Block extends \Magento\Framework\App\Action\Action
2727
*/
2828
private $base64jsonSerializer;
2929

30+
/**
31+
* @var string
32+
*/
33+
private $additionalPageCacheHandle = 'additional_page_cache_handle';
34+
3035
/**
3136
* @param \Magento\Framework\App\Action\Context $context
3237
* @param \Magento\Framework\Translate\InlineInterface $translateInline
@@ -63,6 +68,8 @@ protected function _getBlocks()
6368
$blocks = $this->jsonSerializer->unserialize($blocks);
6469
$handles = $this->base64jsonSerializer->unserialize($handles);
6570

71+
$handles[] = $this->additionalPageCacheHandle;
72+
6673
$this->_view->loadLayout($handles, true, true, false);
6774
$data = [];
6875

0 commit comments

Comments
 (0)