Annotation Type CacheConfig


  • @Target({TYPE,ANNOTATION_TYPE})
    @Retention(RUNTIME)
    @Documented
    @Inherited
    public @interface CacheConfig

    An annotation that can be used on either a type or an annotation stereotype to configure common caching behaviour.

    Since:
    1.0
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String[] cacheNames
      Specifies one or many cache names to store cache operation values in.
      java.lang.Class<? extends CacheKeyGenerator> keyGenerator  
      java.lang.String[] value  
    • Element Detail

      • value

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

        java.lang.String[] cacheNames
        Specifies one or many cache names to store cache operation values in. If specified at the type level, can be overridden at the method level.
        Returns:
        The names of the caches to to store values in
        Default:
        {}
      • keyGenerator

        java.lang.Class<? extends CacheKeyGenerator> keyGenerator
        Returns:
        The default bean type of the key generator
        Default:
        io.micronaut.cache.interceptor.DefaultCacheKeyGenerator.class