Tuesday, 13 February 2018

What is Second-level Cache in Hibernate?

Second level cache is an optional cache and first-level cache will always be consulted before any attempt is made to locate an object in the second-level cache. 
The second-level cache can be configured on a per-class and per-collection basis and mainly responsible for caching objects across sessions.
Any third-party cache can be used with Hibernate. An org.hibernate.cache.CacheProvider interface is provided, which must be implemented to provide Hibernate with a handle to the cache implementation.

No comments:

Post a Comment