I\'m looking for a simple, complete, concise listing of the caches you will run into coding JPA with Hibernate.
In particular I\'d like to know for each cache, the l
Additions/corrections:
(In 2L Cache) Lifecycle/Scope: I believe this is bound to the EntityManagerFactory/SessionFactory. I do not know when old data get cleared out.
This cache is delegated to a specialized cache provider, such as Infinispan or EhCache. So, eviction is configured/requested by you, but performed by the cache provider.
(In 2L Cache) What gets cached: Everything
You need to explicitly tell Hibernate which entities you want to cache.
(Query cache) Summary: This is another secondary cache that can be enabled (usually to try and improve performance).
Query Cache is a cache which stores queries, query parameters and results. If the query and query parameters are the same, you can expect the result to be the same. There are, of course, cache invalidation techniques, such as "invalidate the cache if table X was touched by this update", so that the cache doesn't gets stale.