I'm using the following options in order to activate the cache for doctrine in Symfony2:
doctrine:
dbal:
...
orm:
default_entity_manager: default
...
metadata_cache_driver: apc
query_cache_driver: apc
result_cache_driver: apc
But I'm getting the following error message:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException] Unrecognized options "metadata_cache_driver, query_cache_driver, result_cache_driver" under "doctrine.orm"
I'm using the following versions:
doctrine/cache: v1.4.1
doctrine/common: v2.5.0
doctrine/dbal: v2.4.4
symfony/symfony: v2.6.11
Any suggestions?
If you have more than one Entity Manager configured under entity_managers
section of your config.yml
then you need to configure these options separately for each Entity Manager:
doctrine:
orm:
default_entity_manager: default
entity_managers:
default:
...
metadata_cache_driver: apc
query_cache_driver: apc
result_cache_driver: apc
another_entity_manager:
...
metadata_cache_driver: apc
query_cache_driver: apc
result_cache_driver: apc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With