系统过滤重复的请求

This commit is contained in:
2023-12-25 15:24:37 +08:00
parent 894eccb186
commit 81e435e4a0
3 changed files with 8 additions and 7 deletions

View File

@@ -376,7 +376,7 @@ public class RedisCache {
* @param key 键
* @param value 值
* @param expireTime 过期时间,单位秒
* @return
* @return true: set成功; false失败表示已有值
*/
public Boolean setnx(String key, String value, long expireTime) {
return redisTemplate.opsForValue().setIfAbsent(key, value, expireTime, TimeUnit.SECONDS);