Skip to content

Commit 07df4ac

Browse files
committed
CachingUncoveredFileAnalyser: ensure next release gets fresh cache
1 parent 2f8bbbd commit 07df4ac

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/StaticAnalysis/CachingUncoveredFileAnalyser.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ public function __construct(string $directory, UncoveredFileAnalyser $uncoveredF
2828

2929
public function executableLinesIn(string $filename): array
3030
{
31-
if ($this->has($filename, __METHOD__)) {
32-
return $this->read($filename, __METHOD__);
31+
$cacheKey = 'v2' . __METHOD__;
32+
33+
if ($this->has($filename, $cacheKey)) {
34+
return $this->read($filename, $cacheKey);
3335
}
3436

3537
$data = $this->uncoveredFileAnalyser->executableLinesIn($filename);
3638

37-
$this->write($filename, __METHOD__, $data);
39+
$this->write($filename, $cacheKey, $data);
3840

3941
return $data;
4042
}

0 commit comments

Comments
 (0)