Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unnecessary information in query hints to improve query cache h…
…it ratio I've noticed that over time my query caches fill up with redundant queries, i. e. different cache entries for the DQL -> SQL translation that are exactly the same. For me, it's an issue because the cache entries fill up precious OPcache memory. Further investigation revealed that the queries themselves do not differ, but only the query hints – that are part of the computed cache key – do. In particular, only the value for the `WhereInWalker::HINT_PAGINATOR_ID_COUNT` query hint are different. Since `WhereInWalker` only needs to know _if_ there are matching IDs but not _how many_, we could avoid such cache misses by using just a boolean value as cache hint.
- Loading branch information