mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2025-10-14 14:00:26 +00:00
update 优化 PlusSaTokenDao 删除key同步删除本地缓存
This commit is contained in:
@@ -74,7 +74,9 @@ public class PlusSaTokenDao implements SaTokenDaoBySessionFollowObject {
|
||||
*/
|
||||
@Override
|
||||
public void delete(String key) {
|
||||
RedisUtils.deleteObject(key);
|
||||
if (RedisUtils.deleteObject(key)) {
|
||||
CAFFEINE.invalidate(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,7 +153,9 @@ public class PlusSaTokenDao implements SaTokenDaoBySessionFollowObject {
|
||||
*/
|
||||
@Override
|
||||
public void deleteObject(String key) {
|
||||
RedisUtils.deleteObject(key);
|
||||
if (RedisUtils.deleteObject(key)) {
|
||||
CAFFEINE.invalidate(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user