Annotation Type CacheInvalidate


  • @Target({METHOD,TYPE})
    @Retention(RUNTIME)
    @Inherited
    @Documented
    @CacheConfig
    @CacheAnnotation
    @Repeatable(InvalidateOperations.class)
    public @interface CacheInvalidate

    An annotation that can be applied at the type or method level to indicate that the annotated operation should cause the eviction of the given caches.

    Since:
    1.0
    • Element Detail

      • value

        @AliasFor(member="cacheNames")
        java.lang.String[] value
        Returns:
        Cache names
        Default:
        {}
      • parameters

        java.lang.String[] parameters
        Limit the automatic CacheKeyGenerator to the given parameter names. Mutually exclusive with keyGenerator()
        Returns:
        The parameter names that make up the key.
        Default:
        {}
      • all

        boolean all
        Returns:
        Whether all values within the cache should be evicted or only those for the generated key
        Default:
        false
      • async

        boolean async
        Whether the cache operation should be performed asynchronously and not block the returning value. Note that when set to true then any cache errors will not be propagated back to the client and will simply be logged by default unless the return value itself is a non-blocking type such as CompletableFuture.
        Returns:
        True if should be done asynchronously
        Default:
        false