其他分享
首页 > 其他分享> > SpringBoot:缓存注解@Cacheable详解

SpringBoot:缓存注解@Cacheable详解

作者:互联网

1.查看@Cacheable

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Cacheable {
    @AliasFor("cacheNames")
    String[] value() default {};

    @AliasFor("value")
    String[] cacheNames() default {};

    String key() default "";

    String keyGenerator() default "";

    String cacheManager() default "";

    String cacheResolver() default "";

    String condition() default "";

    String unless() default "";

    boolean sync() default false;
}

2.cacheNames和value

 

 

 

 

标签:缓存,SpringBoot,default,value,cacheNames,Cacheable,ElementType,String
来源: https://www.cnblogs.com/fdzang/p/11989889.html