@Retention(value=RUNTIME) @Target(value=METHOD) public @interface CacheInvalidate
CacheInvalidate
is invoked, Quarkus will compute a cache key and use it to try to
remove an existing entry from the cache. If the method has one or more arguments, the key computation is done from all the
method arguments if none of them is annotated with CacheKey
, or all the arguments annotated with CacheKey
otherwise. This annotation can also be used on a method with no arguments, a default key derived from the cache name is
generated in that case. If the key does not identify any cache entry, nothing will happen.
You can only use one of the cache operations (and this annotation) on a given method: CacheResult
,
CacheInvalidate
or CacheInvalidateAll
.
The underlying caching provider can be chosen and configured in the Quarkus application.properties
file.
public abstract String cacheName
Copyright © 2020 JBoss by Red Hat. All rights reserved.