diff --git a/config/application.config.php-dist-BO b/config/application.config.php-dist-BO index 5ce66d7..b7e2a90 100644 --- a/config/application.config.php-dist-BO +++ b/config/application.config.php-dist-BO @@ -5,6 +5,7 @@ * * @see https://github.com/zendframework/ZFTool */ +$env = getenv('APP_ENV') ?: 'production'; return array( 'modules' => array( 'DoctrineModule', @@ -19,6 +20,12 @@ return array( ), 'config_glob_paths' => array( 'config/autoload/{,*.}{global,local}.php' - ) + ), + 'config_cache_enabled' => ($env == 'production'), + 'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc') + 'module_map_cache_enabled' => ($env == 'production'), + 'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'), + 'cache_dir' => 'data/cache/', + 'check_dependencies' => ($env != 'production'), ), ); diff --git a/config/application.config.php-dist-FO b/config/application.config.php-dist-FO index 85795ce..ee624df 100644 --- a/config/application.config.php-dist-FO +++ b/config/application.config.php-dist-FO @@ -5,6 +5,7 @@ * * @see https://github.com/zendframework/ZFTool */ +$env = getenv('APP_ENV') ?: 'production'; return array( 'modules' => array( 'DoctrineModule', @@ -19,6 +20,12 @@ return array( ), 'config_glob_paths' => array( 'config/autoload/{,*.}{global,local}.php' - ) + ), + 'config_cache_enabled' => ($env == 'production'), + 'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc') + 'module_map_cache_enabled' => ($env == 'production'), + 'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'), + 'cache_dir' => 'data/cache/', + 'check_dependencies' => ($env != 'production'), ), ); diff --git a/config/autoload/global.php b/config/autoload/global.php index d205663..e8fc108 100644 --- a/config/autoload/global.php +++ b/config/autoload/global.php @@ -12,6 +12,11 @@ */ return array( // DOCTRINE CONF + 'service_manager' => array( + 'factories' => array( + 'doctrine.cache.mycache' => 'MonarcCore\Service\DoctrineCacheServiceFactory', + ), + ), 'doctrine' => array( 'connection' => array( 'orm_default' => array( @@ -71,9 +76,9 @@ return array( ), 'configuration' => array( 'orm_default' => array( - 'metadata_cache' => 'array', - 'query_cache' => 'array', - 'result_cache' => 'array', + 'metadata_cache' => 'mycache', + 'query_cache' => 'mycache', + 'result_cache' => 'mycache', 'driver' => 'orm_default', // This driver will be defined later 'generate_proxies' => true, 'proxy_dir' => 'data/DoctrineORMModule/Proxy', @@ -85,9 +90,9 @@ return array( 'second_level_cache' => array(), ), 'orm_cli' => array( - 'metadata_cache' => 'array', - 'query_cache' => 'array', - 'result_cache' => 'array', + 'metadata_cache' => 'mycache', + 'query_cache' => 'mycache', + 'result_cache' => 'mycache', 'driver' => 'orm_cli', // This driver will be defined later 'generate_proxies' => true, 'proxy_dir' => 'data/DoctrineORMModule/Proxy',