From what I understand, the L2 cache is useful when finding an entity by using its primary key.
But is there any point using it for queries that are not based on the primary key? E.g.:
SELECT p FROM Person p WHERE p.age > 18
If the query cache is NOT turned on, will the L2 cache be of any use at all?