Skip to content

Commit 79ba795

Browse files
alzotao-iegorov
authored andcommitted
ACP2E-1958: avoid reloading configs for each requested key
1 parent 7c7461a commit 79ba795

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/internal/Magento/Framework/App/DeploymentConfig.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ public function get($key = null, $defaultValue = null)
8484
}
8585
$result = $this->getByKey($key);
8686
if ($result === null) {
87-
$this->reloadData();
87+
if (empty($this->flatData)) {
88+
$this->reloadData();
89+
}
8890
$result = $this->getByKey($key);
8991
}
9092
return $result ?? $defaultValue;

0 commit comments

Comments
 (0)