Revert "fix 修复 satoken dao层获取timeout为秒导致丢失毫秒进度问题(临时修复 等satoken官方解决)"
This reverts commit e36e8f77581314541b27bcf43dd99bbc2c916255.
This commit is contained in:
parent
ae584d54a6
commit
a07880e1d0
@ -51,11 +51,7 @@ public class PlusSaTokenDao implements SaTokenDao {
|
|||||||
if (timeout == NEVER_EXPIRE) {
|
if (timeout == NEVER_EXPIRE) {
|
||||||
RedisUtils.setCacheObject(key, value);
|
RedisUtils.setCacheObject(key, value);
|
||||||
} else {
|
} else {
|
||||||
if (RedisUtils.hasKey(key)) {
|
RedisUtils.setCacheObject(key, value, Duration.ofSeconds(timeout));
|
||||||
RedisUtils.setCacheObject(key, value, true);
|
|
||||||
} else {
|
|
||||||
RedisUtils.setCacheObject(key, value, Duration.ofSeconds(timeout));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
CAFFEINE.invalidate(key);
|
CAFFEINE.invalidate(key);
|
||||||
}
|
}
|
||||||
@ -118,11 +114,7 @@ public class PlusSaTokenDao implements SaTokenDao {
|
|||||||
if (timeout == NEVER_EXPIRE) {
|
if (timeout == NEVER_EXPIRE) {
|
||||||
RedisUtils.setCacheObject(key, object);
|
RedisUtils.setCacheObject(key, object);
|
||||||
} else {
|
} else {
|
||||||
if (RedisUtils.hasKey(key)) {
|
RedisUtils.setCacheObject(key, object, Duration.ofSeconds(timeout));
|
||||||
RedisUtils.setCacheObject(key, object, true);
|
|
||||||
} else {
|
|
||||||
RedisUtils.setCacheObject(key, object, Duration.ofSeconds(timeout));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
CAFFEINE.invalidate(key);
|
CAFFEINE.invalidate(key);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user