Annotation Type CacheInvalidate


  • @InterceptorBinding
    @Target({TYPE,METHOD})
    @Retention(RUNTIME)
    @Repeatable(List.class)
    public @interface CacheInvalidate
    When a method annotated with 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 used in that case. If the key does not identify any cache entry, nothing will happen.

    This annotation can be combined with multiple other caching annotations on a single method. Caching operations will always be executed in the same order: CacheInvalidateAll first, then CacheInvalidate and finally CacheResult.

    The underlying caching provider can be chosen and configured in the Quarkus application.properties file.

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String cacheName
      The name of the cache.
    • Element Detail

      • cacheName

        String cacheName
        The name of the cache.