[DDC-1216] A way to mark an entity to always use result cache. Like @UseResultCache class annotation. Created: 19/Jun/11 Updated: 06/Apr/12
|Project:||Doctrine 2 - ORM|
|Reporter:||Reio Piller||Assignee:||Benjamin Eberlei|
So that even associations, find(), findBy() etc will be affected. Very useful for entities that are being used on every request.
Is that thinkable?
|Comment by Menno Holtkamp [ 06/Apr/12 ]|
During development, I tried to have the out-of-the-box ORM layer handle as much of the queries as possible, essentially I used the Repository functions a lot:
For example, having a specific Repository extend the Doctrine EntityRepository and do something like:
Now all functionality is developed, I am optimizing performance and I find myself having to refer my Repository to my DAO layer which uses DQL, so I can enable the DQL Result Cache...
It would be nice to be able to configure 'DQL Result Cache = on' on Repository level as well...