The reason the code you have is not working is that @Cache
is not intended to work that way. If you want to cache the results of a query method execution, the easiest way is to use Spring's caching abstraction.
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