From 88a56ee8f8bf4b5d6e0e039f0411088ee99aa568 Mon Sep 17 00:00:00 2001 From: Stefan A Date: Tue, 10 Dec 2013 19:51:02 +0100 Subject: [PATCH] XCache cannot be cleared on CLI (like APC) --- .../ORM/Tools/Console/Command/ClearCache/QueryCommand.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php index 6c8d761ca..f1be98d30 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php @@ -24,6 +24,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Doctrine\Common\Cache\ApcCache; +use Doctrine\Common\Cache\XcacheCache; /** * Command to clear the query cache of the various cache drivers. @@ -87,7 +88,10 @@ EOT if ($cacheDriver instanceof ApcCache) { throw new \LogicException("Cannot clear APC Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); } - + if ($cacheDriver instanceof XcacheCache) { + throw new \LogicException("Cannot clear XCache Cache from Console, its shared in the Webserver memory and not accessible from the CLI."); + } + $output->write('Clearing ALL Query cache entries' . PHP_EOL); $result = $cacheDriver->deleteAll();