springboot +mybatis+redis二级缓存 使用效果

 1  先看核心代码打印出效果图

 2 springboot +mybatis+redis二级缓存小demo

 

1  先看核心代码打印出效果图   

 


 

打印输出内容如下:

 

调用Redis缓存Key : com.sun.proxy.$Proxy77getAccountCheckStatisticsAccountCheckStatisticsPageDto(pageNumber=1, pageSize=15, offSet=0, partnername=null, beginTime=2018-02-02, endTime=2019-05-23)
2019-05-23 20:36:08.715  INFO 11752 --- [nio-8085-exec-5] c.e.d.s.impl.AccountCheckServiceImpl     : ------------------>1086
调用Redis缓存Key : com.sun.proxy.$Proxy77getAccountCheckStatisticsAccountCheckStatisticsPageDto(pageNumber=1, pageSize=15, offSet=0, partnername=null, beginTime=2018-02-02, endTime=2019-05-23)
2019-05-23 20:38:36.705  INFO 11752 --- [nio-8085-exec-7] c.e.d.s.impl.AccountCheckServiceImpl     : ------------------>59  
调用Redis缓存Key : com.sun.proxy.$Proxy77getAccountCheckStatisticsAccountCheckStatisticsPageDto(pageNumber=1, pageSize=15, offSet=0, partnername=null, beginTime=2018-02-02, endTime=2019-05-23)
2019-05-23 20:38:40.662  INFO 11752 --- [nio-8085-exec-8] c.e.d.s.impl.AccountCheckServiceImpl     : ------------------>6 
调用Redis缓存Key : com.sun.proxy.$Proxy77getAccountCheckStatisticsAccountCheckStatisticsPageDto(pageNumber=5, pageSize=15, offSet=60, partnername=null, beginTime=2018-02-02, endTime=2019-05-23) 
2019-05-23 20:43:11.600  INFO 11752 --- [nio-8085-exec-2] c.e.d.s.impl.AccountCheckServiceImpl     : ------------------>153  
调用Redis缓存Key : com.sun.proxy.$Proxy77getAccountCheckStatisticsAccountCheckStatisticsPageDto(pageNumber=5, pageSize=15, offSet=60, partnername=null, beginTime=2018-02-02, endTime=2019-05-23)
2019-05-23 20:43:17.879  INFO 11752 --- [nio-8085-exec-4] c.e.d.s.impl.AccountCheckServiceImpl     : ------------------>7   
调用Redis缓存Key : com.sun.proxy.$Proxy77getAccountCheckStatisticsAccountCheckStatisticsPageDto(pageNumber=8, pageSize=15, offSet=105, partnername=null, beginTime=2018-02-02, endTime=2019-05-23)
2019-05-23 20:43:23.719  INFO 11752 --- [nio-8085-exec-3] c.e.d.s.impl.AccountCheckServiceImpl     : ------------------>143
2019-05-23 20:43:33.068  INFO 11752 --- [nio-8085-exec-6] c.e.d.controller.AccountCheckController  :  
调用Redis缓存Key : com.sun.proxy.$Proxy77getAccountCheckStatisticsAccountCheckStatisticsPageDto(pageNumber=8, pageSize=15, offSet=105, partnername=null, beginTime=2018-02-02, endTime=2019-05-23)
2019-05-23 20:43:33.076  INFO 11752 --- [nio-8085-exec-6] c.e.d.s.impl.AccountCheckServiceImpl     : ------------------>4
 

 

程序输出的结果集:这是一个分页查询语句的执行参数以及执行时间,

pageNumber是1,第一次用时1086 ms,第二次用时59 ms, 第三次6 ms

pageNumber是5,第一次用时153 ms,第二次用时7 ms

pageNumber是8,第一次用时143 ms,第二次用时4 ms

 

2   springboot +mybatis+redis二级缓存小demo

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值