From 53fbb0b2d1e0eeb3d58589eb698392085ad94372 Mon Sep 17 00:00:00 2001 From: Stefan A <stadolf@gmail.com> Date: Tue, 10 Dec 2013 19:48:30 +0100 Subject: [PATCH] XCache cannot be cleared on CLI (like APC) --- .../ORM/Tools/Console/Command/ClearCache/ResultCommand.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php index 26eb3d46d..c21f55452 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php @@ -24,6 +24,7 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Doctrine\Common\Cache\ApcCache; +use Doctrine\Common\Cache\XcacheCache; /** * Command to clear the result cache of the various cache drivers. @@ -88,6 +89,10 @@ EOT 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->writeln('Clearing ALL Result cache entries'); $result = $cacheDriver->deleteAll();