![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
redis
入夜-微凉
这个作者很懒,什么都没留下…
展开
-
使用redis事物解决stringRedisTemplate.setIfAbsent()并设置过期时间遇到的问题
转载地址:https://www.cnblogs.com/exmyth/p/11324777.htmlspring-date-redis版本:1.6.2场景:在使用setIfAbsent(key,value)时,想对key设置一个过期时间,同时需要用到setIfAbsent的返回值来指定之后的流程,所以使用了以下代码:boolean store = stringRedisTemplate.opsForValue().setIfAbsent(key,value);if(store){ str转载 2020-08-12 18:07:45 · 4448 阅读 · 1 评论 -
redis安装
centos7安装redis6.0.41、下载原创 2020-06-21 08:37:00 · 107 阅读 · 0 评论