mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1588: There is no way to get the Query's result cache impl without going to EM #1992
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jan 8, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user ambis:
Ok, my problem is this:
I have created a Query object. Now I'd like to get it's result cache driver.
My options:
I propose that either the QueryCacheProfile is always populated with the Query's default result cache impl unless specifically overridden for the QueryCacheProfile
OR
Make getResultCacheDriver() not deprecated. Like the other two related methods, they are not deprecated, why should this one. Calling this could populate the QueryCacheProfile for future use like all the other (get cache ttl, id) methods.
My problem with with option 3) is "leaving the context of my method and the Query" (mentally of course). Why should I have to go poke around in EM's configuration when the result cache IS (or is easily obtainable behind the scenes) in the query object anyways?
@doctrinebot commented on GitHub (Jan 8, 2012):
Comment created by @beberlei:
Weird, this code looks very strange. I will check and fix that before the 2.2 RC release.
@doctrinebot commented on GitHub (Jan 9, 2012):
Comment created by @beberlei:
The default result cache is now passed to any new query cache profile. The following API is now working as expected:
@doctrinebot commented on GitHub (Jan 9, 2012):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Jan 9, 2012):
Comment created by ambis:
That's perfect! Thank you!