Multiple choice technology programming languages

How to enable query cache in hibernate

  1. Hibernate.cache.query_cache true

  2. Hibernate.cache.use_query_cache true

  3. Hibernate.cache.query_cache yes

  4. None

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Query cache in Hibernate is enabled by setting hibernate.cache.use_query_cache to true. This caches the actual query results along with identifiers. Note that you must also enable second-level cache and mark specific queries as cacheable using setCacheable(true).