1
0
mirror of synced 2024-12-05 03:06:05 +03:00

[2.0] Updating sandbox cli to use APC again but adding comment to use ArrayCache if APC is not available

This commit is contained in:
jwage 2009-09-01 19:59:58 +00:00
parent 2830d4d835
commit fe1db4026b

View File

@ -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);
$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config, $eventManager);