Skip to content

Commit bf2783b

Browse files
committed
also evict cache when acquiring tmpfile fails, to avoid stale caches
1 parent b41210b commit bf2783b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Cache/FileCache.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function put(ClassMetadata $metadata): void
4848

4949
$tmpFile = tempnam($this->dir, 'metadata-cache');
5050
if (false === $tmpFile) {
51+
$this->evict($metadata->name);
52+
5153
return;
5254
}
5355
$data = '<?php return unserialize(' . var_export(serialize($metadata), true) . ');';

0 commit comments

Comments
 (0)