From fe1db4026baf98c3eeb2d2ff4fcb06a71f94075f Mon Sep 17 00:00:00 2001 From: jwage Date: Tue, 1 Sep 2009 19:59:58 +0000 Subject: [PATCH] [2.0] Updating sandbox cli to use APC again but adding comment to use ArrayCache if APC is not available --- tools/sandbox/config.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/sandbox/config.php b/tools/sandbox/config.php index b60f0eb36..de6758baa 100644 --- a/tools/sandbox/config.php +++ b/tools/sandbox/config.php @@ -7,8 +7,10 @@ $classLoader->setBasePath('Doctrine', realpath(__DIR__ . '/../../lib')); $classLoader->setBasePath('Entities', __DIR__); $config = new \Doctrine\ORM\Configuration; +$cache = new \Doctrine\Common\Cache\ApcCache; +// Use ArrayCache is APC is not available +// Warning without APC Doctrine will not perform as well $cache = new \Doctrine\Common\Cache\ArrayCache; -// $cache = new \Doctrine\Common\Cache\ApcCache; # RECOMMENDED FOR PRODUCTION $config->setMetadataCacheImpl($cache); $config->setQueryCacheImpl($cache); @@ -23,4 +25,4 @@ $connectionOptions = array( 'driver' => 'pdo_sqlite', 'path' => 'database.sqlite' ); -$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $eventManager); \ No newline at end of file +$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $eventManager);