1
0
mirror of synced 2025-02-20 22:23:14 +03:00

Fixes DDC-1396.

This commit is contained in:
Guilherme Blanco 2011-10-03 01:30:20 -03:00
parent cd28051370
commit 8efae0b232
3 changed files with 18 additions and 3 deletions

View File

@ -21,7 +21,8 @@ namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
use Symfony\Component\Console\Input\InputArgument,
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.
@ -83,6 +84,10 @@ EOT
if ( ! $cacheDriver) {
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);

View File

@ -21,7 +21,8 @@ namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
use Symfony\Component\Console\Input\InputArgument,
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.
@ -83,6 +84,10 @@ EOT
if ( ! $cacheDriver) {
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);

View File

@ -21,7 +21,8 @@ namespace Doctrine\ORM\Tools\Console\Command\ClearCache;
use Symfony\Component\Console\Input\InputArgument,
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.
@ -83,6 +84,10 @@ EOT
if ( ! $cacheDriver) {
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);