How to Cache DTO Projections with Hibernate
The most efficient way to improve the performance of a database query is to avoid it by retrieving the data from a local cache. That’s why Hibernate offers 3 different caches: The 1st level cache contains all entities loaded and created within the current session. The 2nd level cache is a shared, session-independent cache for…