Which annotation is used in Spring Boot to update the cache whenever the underlying data changes?

  • @CacheUpdate
  • @CacheEvict
  • @CacheInvalidate
  • @CacheRefresh
In Spring Boot, the @CacheRefresh annotation is used to update the cache whenever the underlying data changes. It's used to refresh the cache entries for a specific method or cache name. The other options are related to cache eviction, clearing, or invalidation but not specifically refreshing the cache upon data changes.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *