# Springboot cache **Repository Path**: superzqbo/springboot-cache ## Basic Information - **Project Name**: Springboot cache - **Description**: SpringBoot当中使用SpringbCache - **Primary Language**: Java - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-07 - **Last Updated**: 2021-06-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Springboot cache #### 介绍 SpringBoot当中使用SpringbCache #### 软件架构 Spring高版本引入了Cache的注解技术,该技术是一种规范,官方支持的包括JCache、Redis、Simple、、、等。 Redis的 Cache技术,底层使用的是Spring Data Redis。 Cache技术的使用需要掌握@EnableCaching、@Cacheable、@CacheEvict、@CachePut、@Caching、@CacheConfig注解的使用,这些注解支持Spring SPEL表达式的使用。 Springboot Cache:相等于一种规范、相等于API、类似于JDBC,JCache、Redis、Simple都是它的实现。 Redis的Cache技术底层使用的是Spring Data Redis, #### 安装教程 ````java @EnableCache 作用于Springboot项目的配置类,用于打开Springboot的Cache自动装配 //使用方式 @Configuration @EnableCache public class CacheConfig{ } @Cacheable 用在方法上,一般在调用方法前,如果参数相同,会从缓存当中直接拿数据,否则会将数据写入当缓存当中 @CacheEvict 方法执行后删除缓存 @CachePut 方法执行后更新缓存 @Caching 多个缓存符合操作 @CacheConfig 类上的注解,对类当中的缓存统一配置 ```` #### 使用说明 1. xxxx 2. xxxx 3. xxxx #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)