mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-09 21:59:22 +00:00
fix 修复 satoken dao层获取timeout为秒导致丢失毫秒进度问题(临时修复 等satoken官方解决)
This commit is contained in:
@@ -51,7 +51,11 @@ public class PlusSaTokenDao implements SaTokenDao {
|
||||
if (timeout == NEVER_EXPIRE) {
|
||||
RedisUtils.setCacheObject(key, value);
|
||||
} else {
|
||||
RedisUtils.setCacheObject(key, value, Duration.ofSeconds(timeout));
|
||||
if (RedisUtils.hasKey(key)) {
|
||||
RedisUtils.setCacheObject(key, value, true);
|
||||
} else {
|
||||
RedisUtils.setCacheObject(key, value, Duration.ofSeconds(timeout));
|
||||
}
|
||||
}
|
||||
CAFFEINE.invalidate(key);
|
||||
}
|
||||
@@ -114,7 +118,11 @@ public class PlusSaTokenDao implements SaTokenDao {
|
||||
if (timeout == NEVER_EXPIRE) {
|
||||
RedisUtils.setCacheObject(key, object);
|
||||
} else {
|
||||
RedisUtils.setCacheObject(key, object, Duration.ofSeconds(timeout));
|
||||
if (RedisUtils.hasKey(key)) {
|
||||
RedisUtils.setCacheObject(key, object, true);
|
||||
} else {
|
||||
RedisUtils.setCacheObject(key, object, Duration.ofSeconds(timeout));
|
||||
}
|
||||
}
|
||||
CAFFEINE.invalidate(key);
|
||||
}
|
||||
|
Reference in New Issue
Block a user