mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-20 02:06:38 +08:00
update 优化 PlusSaTokenDao 删除key同步删除本地缓存
This commit is contained in:
parent
54a8189e27
commit
0d93589d99
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user