Annotation Interface CacheRemove


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

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Defines exception classes indicating the exception types that must cause a cache eviction.
    Key of the cache to evict.
    Class<?>[]
    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
      Since:
      1.0.1
      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
      Since:
      1.0.1
      Default:
      {}
    • noEvictOn

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