Skip to content

Commit f9531cb

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'tangoc/MAGETWO-43966' into bugs_pr
2 parents 3a6c8fe + 2b9bc21 commit f9531cb

File tree

3 files changed

+1
-40
lines changed

3 files changed

+1
-40
lines changed

app/code/Magento/Customer/Block/CustomerData.php

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,14 @@
77

88
class CustomerData extends \Magento\Framework\View\Element\Template
99
{
10-
/**
11-
* Sections that can not be cached on frontend-side
12-
*
13-
* @var array
14-
*/
15-
protected $nonCachedSections = [];
16-
1710
/**
1811
* @param \Magento\Framework\View\Element\Template\Context $context
1912
* @param array $data
20-
* @param array $nonCachedSections
2113
*/
2214
public function __construct(
2315
\Magento\Framework\View\Element\Template\Context $context,
24-
array $data = [],
25-
array $nonCachedSections = []
16+
array $data = []
2617
) {
27-
$this->nonCachedSections = $nonCachedSections;
2818
parent::__construct($context, $data);
2919
}
3020

@@ -50,24 +40,4 @@ public function getCustomerDataUrl($route)
5040
{
5141
return $this->getUrl($route, ['_secure' => $this->getRequest()->isSecure()]);
5242
}
53-
54-
/**
55-
* Get sections that can not be cached on frontend-side
56-
*
57-
* @return array
58-
*/
59-
public function getNotCachedSections()
60-
{
61-
return $this->nonCachedSections;
62-
}
63-
64-
/**
65-
* Get keys of sections that can not be cached on frontend-side
66-
*
67-
* @return array
68-
*/
69-
public function getNonCachedSectionKeys()
70-
{
71-
return array_keys($this->nonCachedSections);
72-
}
7343
}

app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
'*' => ['Magento_Customer/js/customer-data' => [
1414
'sectionLoadUrl' => $block->getCustomerDataUrl('customer/section/load'),
1515
'cookieLifeTime' => $block->getCookieLifeTime(),
16-
'nonCachedSections' => $block->getNonCachedSectionKeys(),
1716
]],
1817
]);
1918
?>

app/code/Magento/Customer/view/frontend/web/js/customer-data.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ define([
2323
storage.removeAll();
2424
var date = new Date(Date.now() + parseInt(options.cookieLifeTime, 10) * 1000);
2525
$.localStorage.set('mage-cache-timeout', date);
26-
} else {
27-
invalidateNonCachedSections(options);
2826
}
2927
};
3028

@@ -35,12 +33,6 @@ define([
3533
}
3634
};
3735

38-
var invalidateNonCachedSections = function(options) {
39-
_.each(options.nonCachedSections, function (sectionName) {
40-
storageInvalidation.set(sectionName, true);
41-
});
42-
}
43-
4436
var dataProvider = {
4537
getFromStorage: function (sectionNames) {
4638
var result = {};

0 commit comments

Comments
 (0)