From a3c9edde78cccda0ab36096e365fc5ebc0ae7eee Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期四, 29 八月 2024 20:53:39 +0800
Subject: [PATCH] fix 修复 升级依赖导致的依赖冲突
---
ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java
index 2cfc927..38e12c3 100644
--- a/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java
+++ b/ruoyi-common/ruoyi-common-satoken/src/main/java/org/dromara/common/satoken/core/dao/PlusSaTokenDao.java
@@ -2,7 +2,6 @@
import cn.dev33.satoken.dao.SaTokenDao;
import cn.dev33.satoken.util.SaFoxUtil;
-import cn.hutool.core.lang.Console;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import org.dromara.common.redis.utils.RedisUtils;
@@ -37,7 +36,6 @@
@Override
public String get(String key) {
Object o = CAFFEINE.get(key, k -> RedisUtils.getCacheObject(key));
- Console.log("caffeine -> key:" + key + ",value:" + o);
return (String) o;
}
@@ -55,7 +53,7 @@
} else {
RedisUtils.setCacheObject(key, value, Duration.ofSeconds(timeout));
}
- CAFFEINE.put(key, value);
+ CAFFEINE.invalidate(key);
}
/**
@@ -65,7 +63,7 @@
public void update(String key, String value) {
if (RedisUtils.hasKey(key)) {
RedisUtils.setCacheObject(key, value, true);
- CAFFEINE.put(key, value);
+ CAFFEINE.invalidate(key);
}
}
@@ -101,7 +99,6 @@
@Override
public Object getObject(String key) {
Object o = CAFFEINE.get(key, k -> RedisUtils.getCacheObject(key));
- Console.log("caffeine -> key:" + key + ",value:" + o);
return o;
}
@@ -119,7 +116,7 @@
} else {
RedisUtils.setCacheObject(key, object, Duration.ofSeconds(timeout));
}
- CAFFEINE.put(key, object);
+ CAFFEINE.invalidate(key);
}
/**
@@ -129,7 +126,7 @@
public void updateObject(String key, Object object) {
if (RedisUtils.hasKey(key)) {
RedisUtils.setCacheObject(key, object, true);
- CAFFEINE.put(key, object);
+ CAFFEINE.invalidate(key);
}
}
--
Gitblit v1.9.3