springboot整合springCache实现注解方式缓存
spring boot cache 提供了一些注解操作缓存:
@Cacheable:触发将数据保存到缓存中的操作。
@CacheEvict:触发将数据从缓存中删除的操作。
@CachePut:不影响方法执行更新缓存。
@Caching:配置于函数上,组合以上多个操作。
@CacheConfig:在类级别共享缓存的相同配置。
文档地址:https://docs.spring.io/spring-framework/docs/5.2.19.RELEASE/spring-framework-reference
原创
2022-02-16 11:10:50 ·
873 阅读 ·
0 评论