Skip to content

Commit a9cfe44

Browse files
author
Roman Ganin
committed
MAGETWO-38810: Optimize Magento\PageCache\Model\Observer\ProcessLayoutRenderElement :: execute
- CR Changes
1 parent 88abc42 commit a9cfe44

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/code/Magento/PageCache/Model/Observer/ProcessLayoutRenderElement.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class ProcessLayoutRenderElement
2020
*
2121
* @var bool
2222
*/
23-
protected $_isVarnishEnabled;
23+
protected $isVarnishEnabled;
2424

2525
/**
2626
* Is full page cache enabled flag
2727
*
2828
* @var bool
2929
*/
30-
protected $_isFullPageCacheEnabled;
30+
protected $isFullPageCacheEnabled;
3131

3232
/**
3333
* Class constructor
@@ -67,23 +67,23 @@ protected function _wrapEsi(
6767
*/
6868
protected function isFullPageCacheEnabled()
6969
{
70-
if ($this->_isFullPageCacheEnabled === null) {
71-
$this->_isFullPageCacheEnabled = $this->_config->isEnabled();
70+
if ($this->isFullPageCacheEnabled === null) {
71+
$this->isFullPageCacheEnabled = $this->_config->isEnabled();
7272
}
73-
return $this->_isFullPageCacheEnabled;
73+
return $this->isFullPageCacheEnabled;
7474
}
7575

7676
/**
7777
* Is varnish cache engine enabled
7878
*
7979
* @return bool
8080
*/
81-
protected function isVarnishEbabled()
81+
protected function isVarnishEnabled()
8282
{
83-
if ($this->_isVarnishEnabled === null) {
84-
$this->_isVarnishEnabled = ($this->_config->getType() == \Magento\PageCache\Model\Config::VARNISH);
83+
if ($this->isVarnishEnabled === null) {
84+
$this->isVarnishEnabled = ($this->_config->getType() == \Magento\PageCache\Model\Config::VARNISH);
8585
}
86-
return $this->_isVarnishEnabled;
86+
return $this->isVarnishEnabled;
8787
}
8888

8989
/**
@@ -106,7 +106,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
106106
if ($block instanceof \Magento\Framework\View\Element\AbstractBlock) {
107107
$blockTtl = $block->getTtl();
108108
$output = $transport->getData('output');
109-
if (isset($blockTtl) && $this->isVarnishEbabled()) {
109+
if (isset($blockTtl) && $this->isVarnishEnabled()) {
110110
$output = $this->_wrapEsi($block, $layout);
111111
} elseif ($block->isScopePrivate()) {
112112
$output = sprintf(

0 commit comments

Comments
 (0)