java - Spring Cacheable vs CachePut? - Stack Overflow
@CachePut always lets the method execute. It is generally used if you want your cache to be updated with the result of the method execution.
Example: When you want to update a stale data which is cached, instead of blowing the cache completely.
@Cacheable will be executed only once for the given cachekey and subsequent requests won't execute the method, until the cache expires or gets flushed.
Read full article from java - Spring Cacheable vs CachePut? - Stack Overflow
No comments:
Post a Comment