doctrine2 - Caching configuration in ZF2 & Doctrine 2 -
i try build simple application using zend framework 2 , doctrine 2. decided use yaml config files doctrine.yml
file follow:
driver: application_entities: class: 'doctrine\orm\mapping\driver\annotationdriver' cache: 'array' paths: - '__dir__/../src/__namespace__/entity' orm_default: drivers: 'application\entity': application_entities authentication: orm_default: object_manager: 'doctrine\orm\entitymanager' identity_class: 'application\entity\user' identity_property: 'login' credential_property: 'password' configuration: orm_default: metadata_cache: 'array' query_cache: 'array'
now, question is: cache config proper? , how can verify it's working?
of course know should use better driver simple array moment it's enough me.
doctrine provides set of command-line tools simplify common administration tasks such this. here example list of available commands:
in case, should use orm:ensure-production-settings command make sure proxy generation, metadata , query cache configurations correct.
assuming using doctrineormmodule integrate doctrine zend framework 2, open console , type:
$ cd /path/to/your/projectroot $ php public/index.php orm:ensure-production-settings
the output warn if caching configuration incorrect.
here detailed official documentation doctrine console.
Comments
Post a Comment