Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
普蓝开源社区
盘古开发框架
提交
4b075ae0
盘古开发框架
项目概览
普蓝开源社区
/
盘古开发框架
通知
25
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
盘古开发框架
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4b075ae0
编写于
12月 17, 2021
作者:
X
xiongchun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
编写文档
上级
6cd4e72a
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
5 addition
and
1 deletion
+5
-1
pangu-examples/README.md
pangu-examples/README.md
+3
-0
pangu-examples/pangu-examples-cache-layering/src/main/java/com/gitee/pulanos/pangu/showcases/cache/layering/service/ApiBasedDemoService.java
...showcases/cache/layering/service/ApiBasedDemoService.java
+2
-1
未找到文件。
pangu-examples/README.md
浏览文件 @
4b075ae0
...
...
@@ -23,6 +23,9 @@
2.
使用MybatisPlus的API接口操作数据库的常用方法
3.
分页查询和手工映复杂SQL的方法
-
**pangu-examples-cache-layering**
1.
如何使用两级缓存(本地缓存+Redis集中缓存)。
-
**pangu-examples-dubbo-api**
1.
开发Dubbo服务时接口文件和POJO相关类的打包模块
...
...
pangu-examples/pangu-examples-cache-layering/src/main/java/com/gitee/pulanos/pangu/showcases/cache/layering/service/ApiBasedDemoService.java
浏览文件 @
4b075ae0
package
com.gitee.pulanos.pangu.showcases.cache.layering.service
;
import
cn.hutool.core.thread.ThreadUtil
;
import
com.github.xiaolyuh.cache.LayeringCache
;
import
com.github.xiaolyuh.manager.CacheManager
;
import
com.github.xiaolyuh.setting.FirstCacheSetting
;
...
...
@@ -35,7 +36,7 @@ public class ApiBasedDemoService {
String
cacheKey
=
"10"
;
LayeringCache
cache
=
(
LayeringCache
)
cacheManager
.
getCache
(
cacheName
,
layeringCacheSetting
);
cache
.
put
(
cacheKey
,
"test"
);
cache
.
get
(
cacheKey
,
String
.
class
);
log
.
info
(
cache
.
get
(
cacheKey
,
String
.
class
)
);
//cache.evict(cacheKey);
//cache.clear();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录