What is second level cache in hibernate ?
+3
A:
Hibernate comes with three different caches: first level, second level and query cache.
The first level cache is the Hibernate Session and is used to track the state of entities during the current Session (or unit of work). This is a transaction-level cache.
The second level cache shares entity state across various Session. This is a SessionFactory-level cache.
The query cache is used to cache queries (and their parameters) and their results.
Recommended readings
Pascal Thivent
2010-05-13 16:56:10