update cache management (cache:clear is not a solution)

This commit is contained in:
Simon Vieille 2021-04-04 20:09:16 +02:00
commit 2de1c8ddaa
4 changed files with 21 additions and 13 deletions

View file

@ -40,12 +40,21 @@ class SymfonyCacheManager
{
$application = new Application($this->kernel);
$application->setAutoExit(false);
$output = new BufferedOutput();
$input = new ArrayInput([
'command' => 'cache:clear',
'-e' => $this->kernel->getEnvironment(),
'--no-warmup' => null,
]);
$application->run($input, $output);
$input = new ArrayInput([
'command' => 'cache:warmup',
'-e' => $this->kernel->getEnvironment(),
]);
$output = new BufferedOutput();
$application->run($input, $output);
}
}