DDC-611 - Throw an exception if trying to clear an APC Cache from the CLI since there is no access to the webserver shared memory (thanks Romain Dalmaso for reporting)
This commit is contained in:
parent
321fc2506d
commit
afd4121116
@ -66,6 +66,10 @@ EOT
|
||||
throw new \InvalidArgumentException('No Metadata cache driver is configured on given EntityManager.');
|
||||
}
|
||||
|
||||
if ($cacheDriver instanceof \Doctrine\Common\Cache\ApcCache) {
|
||||
throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI.");
|
||||
}
|
||||
|
||||
$output->write('Clearing ALL Metadata cache entries' . PHP_EOL);
|
||||
|
||||
$cacheIds = $cacheDriver->deleteAll();
|
||||
|
@ -66,6 +66,10 @@ EOT
|
||||
throw new \InvalidArgumentException('No Query cache driver is configured on given EntityManager.');
|
||||
}
|
||||
|
||||
if ($cacheDriver instanceof \Doctrine\Common\Cache\ApcCache) {
|
||||
throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI.");
|
||||
}
|
||||
|
||||
$output->write('Clearing ALL Query cache entries' . PHP_EOL);
|
||||
|
||||
$cacheIds = $cacheDriver->deleteAll();
|
||||
|
@ -84,6 +84,10 @@ EOT
|
||||
throw new \InvalidArgumentException('No Result cache driver is configured on given EntityManager.');
|
||||
}
|
||||
|
||||
if ($cacheDriver instanceof \Doctrine\Common\Cache\ApcCache) {
|
||||
throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI.");
|
||||
}
|
||||
|
||||
$outputed = false;
|
||||
|
||||
// Removing based on --id
|
||||
|
Loading…
x
Reference in New Issue
Block a user