Annotation Interface CacheRemove


@Target(METHOD) @Retention(RUNTIME) public @interface CacheRemove
Annotation indicating that the cache must be evicted.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defines exception classes indicating the exception types that must cause a cache eviction.
    Key of the cache to evict.
    Defines exception Classes indicating the exception types that must not cause a cache eviction.
  • Element Details

    • key

      String key
      Key of the cache to evict.
      Returns:
      Key of the cache
      Default:
      "{class}.{method}"
    • evictOn

      Class[] evictOn
      Defines exception classes indicating the exception types that must cause a cache eviction. If classes are specified, the cache will only be evicted if the specified exceptions are thrown.
      Returns:
      Class[] of Exceptions
      Default:
      {}
    • noEvictOn

      Class[] noEvictOn
      Defines exception Classes indicating the exception types that must not cause a cache eviction.
      Returns:
      Class[] of Exceptions
      Default:
      {}