QueryCacheProfile generating invalid cacheKeys #5040

Open
opened 2026-01-22 14:57:09 +01:00 by admin · 0 comments
Owner

Originally created by @odiaseo on GitHub (Mar 10, 2016).

The method Doctrine\Common\Cache\Cache::generateCacheKeys uses the code below to generate the cache key which is then used as the index of the result array. The value of $query is the SQL string. The entire value needs to be hashed or serialized.

$realCacheKey = $query . "-" . serialize($params) . "-" . serialize($types);

Originally created by @odiaseo on GitHub (Mar 10, 2016). The method `Doctrine\Common\Cache\Cache::generateCacheKeys` uses the code below to generate the cache key which is then used as the index of the result array. The value of `$query` is the SQL string. The entire value needs to be hashed or serialized. `$realCacheKey = $query . "-" . serialize($params) . "-" . serialize($types);`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5040