How to use Ehcache as Hibernate’s 2nd Level Cache
Using JPA’s and Hibernate’s 2nd level cache can improve the performance of your persistence layer. It acts as a session-independent entity store. Hibernate uses it whenever you call the find method on your EntityManager or traverse an association to fetch a cached entity. Instead of executing a database query, Hibernate gets the entity object from…