首页 > 其他 > 详细

redistempalate的超时设置的操作更新

时间:2019-09-25 18:13:34      阅读:162      评论:0      收藏:0      [点我收藏+]

redistempalate的超时设置时,一定要每次用set写入时,更新超时,默认是不会自动更新的。

例如:


int tempTime = this.redisTemplate.getExpire("max").intValue();
tempCount = this.redisTemplate.opsForValue().get("max")-1;
this.redisTemplate.opsForValue().set("max", tempCount);
this.redisTemplate.expire("max",tempTime,TimeUnit.SECONDS);

原文链接:https://blog.csdn.net/yuxin6866/article/details/52401590

redistempalate的超时设置的操作更新

原文:https://www.cnblogs.com/muxi0407/p/11585630.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!