Spring Cache evict() method
Spring Cache evict() method
void evict(Object key)
Evict the mapping for this key from this cache if it is present.
Actual eviction may be performed in an asynchronous or deferred fashion, with subsequent lookups possibly still seeing the entry. This may for example be the case with transactional cache decorators. Use evictIfPresent(java.lang.Object) for guaranteed immediate removal.
Example:
Cache cache = ....////Cache object
cache.evict(Object);
Comments
Post a Comment