We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d95d459 + be22b37 commit e9db324Copy full SHA for e9db324
lib/internal/Magento/Framework/Module/Dir/Reader.php
@@ -46,6 +46,13 @@ class Reader
46
*/
47
protected $readFactory;
48
49
+ /**
50
+ * Cache storage
51
+ *
52
+ * @var array
53
+ */
54
+ protected $cache = [];
55
+
56
/**
57
* @param Dir $moduleDirs
58
* @param ModuleListInterface $moduleList
@@ -72,7 +79,10 @@ public function __construct(
72
79
73
80
public function getConfigurationFiles($filename)
74
81
{
75
- return $this->fileIteratorFactory->create($this->getFiles($filename, Dir::MODULE_ETC_DIR));
82
+ if (isset($this->cache[$filename])) {
83
+ return $this->cache[$filename];
84
+ }
85
+ return $this->cache[$filename] = $this->fileIteratorFactory->create($this->getFiles($filename, Dir::MODULE_ETC_DIR));
76
86
}
77
87
78
88
0 commit comments