How does the Hibernate cache optimize searches?
I understand that if I search an entity for its primary key it will be in some sort of Map.
However, how does it optimize searches in the cache by attributes other than its primary key?
Does it create indices based on the declared indices via the JPA annotation @Index, for example?
I'm guessing it's not really viable to search in the cache if the clauses do not contain a primary key.