fix: preserve running kernel cache during archive updates
This commit is contained in:
1 parent
c82a37643b
commit
7c1c86b864
9 files changed
+176
-19
No files matched your search
@@ -8,4 +8,17 @@ use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
|
||||
private ?string $releaseCacheDir = null;
|
||||
|
||||
public function getCacheDir(): string
|
||||
{
|
||||
// A web update still needs its compiled services until the response has finished.
|
||||
// The next release builds its own cache without deleting the running request's files.
|
||||
return $this->releaseCacheDir ??= parent::getCacheDir().'/release-'.substr(
|
||||
hash_file('sha256', $this->getProjectDir().'/VERSION'),
|
||||
0,
|
||||
16,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user