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

    xiaoxiao2022-07-13  164

     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)