What is the difference between putting @Cache in Entities and @QueryHints in Queries?

11 Views Asked by At

I'm using spring data jpa and hibernate. I implement level 2 cache with redisson-hibernate.

Caching works when you put @QueryHints notation in Queries without @cache notation in Entities. In this case, what is the particular reason why we do not put @Cache notation in Entities?

0

There are 0 best solutions below