You need to be aware that by giving up on the Hibernate QueryCache your are responsible for invalidating the queries that become stale when saving, updating, deleting entities that influenced the query result(what Oliver is doing by setting CacheEvict on save) - which I think can be a pain- or at least you need to take into account and ignore it if it's not really a problem for your scenario.
Read full article from java - How to cache results of a Spring Data JPA query method without using query cache? - Stack Overflow
No comments:
Post a Comment