posted 8 years ago
The query cache does not cache the entire object, as the first and second level cached do, it caches the query plus the returned identifiers. Remember not all queries willl return whole populated objects after all. Hibernate will uses these identifiers to access data possibly cached in the second level cache. If its not cached there it will hit the database.