Fixes DDC-1396.
This commit is contained in:
parent
cd28051370
commit
8efae0b232
3 changed files with 18 additions and 3 deletions
|
@ -21,7 +21,8 @@ namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||||
|
|
||||||
use Symfony\Component\Console\Input\InputArgument,
|
use Symfony\Component\Console\Input\InputArgument,
|
||||||
Symfony\Component\Console\Input\InputOption,
|
Symfony\Component\Console\Input\InputOption,
|
||||||
Symfony\Component\Console;
|
Symfony\Component\Console,
|
||||||
|
Doctrine\Common\Cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command to clear the metadata cache of the various cache drivers.
|
* Command to clear the metadata cache of the various cache drivers.
|
||||||
|
@ -83,6 +84,10 @@ EOT
|
||||||
if ( ! $cacheDriver) {
|
if ( ! $cacheDriver) {
|
||||||
throw new \InvalidArgumentException('No Metadata cache driver is configured on given EntityManager.');
|
throw new \InvalidArgumentException('No Metadata cache driver is configured on given EntityManager.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($cacheDriver instanceof 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);
|
$output->write('Clearing ALL Metadata cache entries' . PHP_EOL);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,8 @@ namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||||
|
|
||||||
use Symfony\Component\Console\Input\InputArgument,
|
use Symfony\Component\Console\Input\InputArgument,
|
||||||
Symfony\Component\Console\Input\InputOption,
|
Symfony\Component\Console\Input\InputOption,
|
||||||
Symfony\Component\Console;
|
Symfony\Component\Console,
|
||||||
|
Doctrine\Common\Cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command to clear the query cache of the various cache drivers.
|
* Command to clear the query cache of the various cache drivers.
|
||||||
|
@ -83,6 +84,10 @@ EOT
|
||||||
if ( ! $cacheDriver) {
|
if ( ! $cacheDriver) {
|
||||||
throw new \InvalidArgumentException('No Query cache driver is configured on given EntityManager.');
|
throw new \InvalidArgumentException('No Query cache driver is configured on given EntityManager.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($cacheDriver instanceof 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);
|
$output->write('Clearing ALL Query cache entries' . PHP_EOL);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,8 @@ namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
|
||||||
|
|
||||||
use Symfony\Component\Console\Input\InputArgument,
|
use Symfony\Component\Console\Input\InputArgument,
|
||||||
Symfony\Component\Console\Input\InputOption,
|
Symfony\Component\Console\Input\InputOption,
|
||||||
Symfony\Component\Console;
|
Symfony\Component\Console,
|
||||||
|
Doctrine\Common\Cache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Command to clear the result cache of the various cache drivers.
|
* Command to clear the result cache of the various cache drivers.
|
||||||
|
@ -83,6 +84,10 @@ EOT
|
||||||
if ( ! $cacheDriver) {
|
if ( ! $cacheDriver) {
|
||||||
throw new \InvalidArgumentException('No Result cache driver is configured on given EntityManager.');
|
throw new \InvalidArgumentException('No Result cache driver is configured on given EntityManager.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($cacheDriver instanceof 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 Result cache entries' . PHP_EOL);
|
$output->write('Clearing ALL Result cache entries' . PHP_EOL);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue