Let's imagine that I have a method which can updates one field for all entities.
public void makeAllCarsRed(){...}
I know that Spring offers 3 annotation to manage cache:
@Cacheable
- tries to find value in cache. If cannot find - execute method and adds to cache;@CachEvict
- just remove objects from cache by criteria;@CachPut
- put new value to cache
I don't see a way to apply these annotations for my situation.
P.S.
I think that it is too expensive to invalidate all cach