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.
1 parent 9b8d557 commit ef76b7eCopy full SHA for ef76b7e
lib/internal/Magento/Framework/Filesystem/Glob.php
@@ -14,6 +14,7 @@
14
*/
15
class Glob extends LaminasGlob
16
{
17
+ protected static $cache = [];
18
/**
19
* Find pathnames matching a pattern.
20
*
@@ -24,11 +25,16 @@ class Glob extends LaminasGlob
24
25
26
public static function glob($pattern, $flags = 0, $forceFallback = false)
27
28
+ $key = $pattern . '|' . $flags . '|' . ($forceFallback ? 1 : 0);
29
+ if (isset(self::$cache[$key])) {
30
+ return self::$cache[$key];
31
+ }
32
try {
33
$result = LaminasGlob::glob($pattern, $flags, $forceFallback);
34
} catch (LaminasRuntimeException $e) {
35
$result = [];
36
}
37
+ self::$cache[$key] = $result;
38
return $result;
39
40
0 commit comments