1 Star 0 Fork 0

dounine / springcloud-twocache

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

springcloud-twocache

springcloud-twocache本地加redis高效双级缓存

使用教程

打包安装项目

git clone https://github.com/dounine/spring-cloud.git
cd spring-cloud
gradle install -xtest

在项目中引用 build.gradle

dependencies {
    compile('com.dounine.twocache:springcloud-twocache:0.0.1-SNAPSHOT')
}

application.yml添加如下代码

spring:
  redis:
    host: localhost
    port: 6379
twocache:
  enable: true
  redis:
    topic: 项目名

java代码中使用(与spring cache使用缓存一样)

@Cacheable(cacheNames = "user",key = "#userId")
public String queryUser(@PathVariable String userId) {
...
}

空文件

简介

springcloud-twocache本地加redis高效率双级缓存。 API -> 本地缓存 -> Redis缓存 通知 -> Redis缓存 -> 本地缓存 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/huanghuanlai/springcloud-twocache.git
git@gitee.com:huanghuanlai/springcloud-twocache.git
huanghuanlai
springcloud-twocache
springcloud-twocache
master

搜索帮助