Skip to content

Commit ad04102

Browse files
committed
Made closure php-src cachable
1 parent a4325dd commit ad04102

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cache/FileCacheStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function load(string $key, string $variableKey)
4949
{
5050
[,, $filePath] = $this->getFilePaths($key);
5151

52-
return (static function () use ($variableKey, $filePath) {
52+
return (static function ($variableKey, $filePath) {
5353
$cacheItem = @include $filePath;
5454
if (!$cacheItem instanceof CacheItem) {
5555
return null;
@@ -59,7 +59,7 @@ public function load(string $key, string $variableKey)
5959
}
6060

6161
return $cacheItem->getData();
62-
})();
62+
})($variableKey, $filePath);
6363
}
6464

6565
/**

0 commit comments

Comments
 (0)