Skip to content

Commit

Permalink
Fix PageCache: async rendering of blocks can corrupt layout cache #8554
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-martinez-interactiv4 committed May 9, 2017
1 parent c3cb46a commit 3bdfa1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/code/Magento/PageCache/Controller/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ abstract class Block extends \Magento\Framework\App\Action\Action
*/
private $base64jsonSerializer;

/**
* @var string
*/
private $additionalPageCacheHandle = 'additional_page_cache_handle';

/**
* @param \Magento\Framework\App\Action\Context $context
* @param \Magento\Framework\Translate\InlineInterface $translateInline
Expand Down Expand Up @@ -63,6 +68,8 @@ protected function _getBlocks()
$blocks = $this->jsonSerializer->unserialize($blocks);
$handles = $this->base64jsonSerializer->unserialize($handles);

$handles[] = $this->additionalPageCacheHandle;

$this->_view->loadLayout($handles, true, true, false);
$data = [];

Expand Down

0 comments on commit 3bdfa1b

Please sign in to comment.