Skip to content

Commit f0d1035

Browse files
alzotao-iegorov
authored andcommitted
ACP2E-1958: avoid reloading configs for each requested key; added unit tests
1 parent 34601c7 commit f0d1035

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/internal/Magento/Framework/Module/ModuleList.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ public function isModuleInfoAvailable()
140140
*/
141141
private function loadConfigData()
142142
{
143-
$config = $this->config->get(ConfigOptionsListConstants::KEY_MODULES);
144-
if (null === $this->configData && null !== $config) {
145-
$this->configData = $config;
143+
if (null === $this->configData) {
144+
$config = $this->config->get(ConfigOptionsListConstants::KEY_MODULES);
145+
if (null !== $config) {
146+
$this->configData = $config;
147+
}
146148
}
147149
}
148150

0 commit comments

Comments
 (0)