Skip to content

Commit cbea532

Browse files
author
Oleksandr Gorkun
committed
MAGETWO-81469: Cached Config is Different From DB
1 parent e4c752b commit cbea532

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

app/code/Magento/Config/App/Config/Type/System.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,7 @@ public function __construct(
123123
public function get($path = '')
124124
{
125125
if ($path === '') {
126-
$this->data = array_replace_recursive($this->data, $allData = $this->loadAllData());
127-
$allData = $this->postProcessor->process($allData);
128-
$this->data = array_replace_recursive($this->data, $allData);
126+
$this->data = array_replace_recursive($this->data, $this->loadAllData());
129127

130128
return $this->data;
131129
}
@@ -146,7 +144,7 @@ private function getWithParts($path)
146144
if (count($pathParts) === 1 && $pathParts[0] !== ScopeInterface::SCOPE_DEFAULT) {
147145
if (!isset($this->data[$pathParts[0]])) {
148146
$data = $this->readData();
149-
$this->data = $this->postProcessor->process($data);
147+
$this->data = array_replace_recursive($this->data, $this->postProcessor->process($data));
150148
}
151149

152150
return $this->data[$pathParts[0]];
@@ -194,9 +192,10 @@ private function loadAllData()
194192
$data = $this->readData();
195193
} else {
196194
$data = $this->serializer->unserialize($cachedData);
195+
$this->data = $data;
197196
}
198197

199-
return $data;
198+
return $this->postProcessor->process($data);
200199
}
201200

202201
/**

0 commit comments

Comments
 (0)