Skip to content

Commit

Permalink
AC-8477: /page_cache/block/esi handles param enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
rizwankhgl committed Jul 12, 2023
1 parent 1727b68 commit ae0d332
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/code/Magento/PageCache/Controller/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ abstract class Block extends \Magento\Framework\App\Action\Action
/**
* Handle size system name
*/
public const XML_HANDLES_SIZE = 'system/full_page_cache/handles_size';
private const XML_HANDLES_SIZE = 'system/full_page_cache/handles_size';

/**
* @param \Magento\Framework\App\Action\Context $context
Expand Down Expand Up @@ -111,9 +111,9 @@ protected function _getBlocks()
$blocks = $this->jsonSerializer->unserialize($blocks);
$handles = $this->base64jsonSerializer->unserialize($handles);

$handles_size = (int) $this->config->getValue(self::XML_HANDLES_SIZE);
$handles = ($handles_size && count($handles) > $handles_size)
? array_splice($handles, 0, $handles_size) : $handles;
$handleSize = (int) $this->config->getValue(self::XML_HANDLES_SIZE);
$handles = ($handleSize && count($handles) > $handleSize)
? array_splice($handles, 0, $handleSize) : $handles;

if (!$this->validateHandleParam($handles)) {
return [];
Expand Down

0 comments on commit ae0d332

Please sign in to comment.