Skip to content

Commit 6bc291d

Browse files
committed
MAGETWO-96463: Add caching to improve admin performance
- make cache key more unique
1 parent db74133 commit 6bc291d

File tree

1 file changed

+10
-1
lines changed
  • lib/internal/Magento/Framework/Config

1 file changed

+10
-1
lines changed

lib/internal/Magento/Framework/Config/View.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,16 @@ protected function initData()
244244
public function read($scope = null)
245245
{
246246
$scope = $scope ?: $this->_defaultScope;
247-
$layoutCacheKey = __CLASS__ . '-'. $scope . '-' . $this->_fileName . '-' . $this->design->getArea();
247+
$layoutCacheKey = implode(
248+
'-',
249+
[
250+
__CLASS__,
251+
$scope,
252+
$this->_fileName,
253+
$this->design->getArea(),
254+
$this->serializer->serialize($this->xpath)
255+
]
256+
);
248257
if (!isset($this->scopedLayoutCache[$layoutCacheKey])) {
249258
if ($data = $this->layoutCache->load($layoutCacheKey)) {
250259
$this->scopedLayoutCache[$layoutCacheKey] = $this->serializer->unserialize($data);

0 commit comments

Comments
 (0)