Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix: Consider result of FilterStrategy in Query Cache
With an activate query cache, queries will be cached at a key generated in https://github.com/doctrine/orm/blob/152c04c03d68d39f485d367713dd69dec0f4106d/lib/Doctrine/ORM/Query.php#L792-L803 . If a SQLFilter does not produce static SQL but dynamic SQL, you need to call SQLFilter->setParameter for the dynamic parts, in order for them to be considered for the cache key: https://github.com/doctrine/orm/blob/152c04c03d68d39f485d367713dd69dec0f4106d/lib/Doctrine/ORM/Query/Filter/SQLFilter.php#L178-L181 . I.e. without setParameter() calls, the first generated query was cached and whatever visibility value the FilterStrategy had determined was reused for future requests. @see doctrine/orm#3955
- Loading branch information