Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Aug 24, 2023
1 parent 1a903a2 commit 5846317
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public function createByDirectory(string $directory): OptimizedDirectorySourceLo

$cacheKey = sprintf('odsl-%s', $directory);
$variableCacheKey = 'v1';

/** @var array<string, array{string, string[], string[], string[]}>|null $cached */
$cached = $this->cache->load($cacheKey, $variableCacheKey);
if ($cached !== null) {
foreach ($cached as $file => [$hash, $classes, $functions, $constants]) {
Expand All @@ -62,6 +64,8 @@ public function createByDirectory(string $directory): OptimizedDirectorySourceLo
[$newClasses, $newFunctions, $newConstants] = $this->findSymbols($file);
$cached[$file] = [$newHash, $newClasses, $newFunctions, $newConstants];
}
} else {
$cached = [];
}

foreach ($fileHashes as $file => $newHash) {
Expand Down

0 comments on commit 5846317

Please sign in to comment.