Hibernate second-level caching (Intermediate)
In this recipe, we will cover the following topics:
- Ehcache as caching engine provider in a Hibernate project
- Hibernate second-level caching and its implementation
We will examine how to implement Hibernate second-level caching by integrating Ehcache as the cache provider. We also review what configuration is required to fully extend Ehcache in Hibernate.
Second-level caching is associated to the session factory object. This simply means that caching can be shared across multiple sessions instead of a per-session basis (first-level caching). Implementing second-level caching with Ehcache is one of the most utilized techniques in the industry.
In this recipe we discuss Ehcache integration with ...