[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:
parent
2830d4d835
commit
fe1db4026b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user