Showing posts with label CacheEvict. Show all posts
Showing posts with label CacheEvict. Show all posts

Spring Cache - Part 5 - CacheEvict

In the Spring Cache series so far (Part1, Part2, Part3, Part4), we have seen examples where the data is getting added to the cache through the use of @Cacheable and @CachePut. But, what about removing data from cache? Consider a call to delete the record from Service or DB, in which case, we would also want to delete that record from the cache.