diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/CaffeineCacheDecorator.java b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/CaffeineCacheDecorator.java index 7d3ab426..ee1d405f 100644 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/CaffeineCacheDecorator.java +++ b/ruoyi-common/ruoyi-common-redis/src/main/java/org/dromara/common/redis/manager/CaffeineCacheDecorator.java @@ -1,6 +1,5 @@ package org.dromara.common.redis.manager; -import cn.hutool.core.lang.Console; import org.dromara.common.core.utils.SpringUtils; import org.springframework.cache.Cache; @@ -50,10 +49,12 @@ public class CaffeineCacheDecorator implements Cache { @Override public void put(Object key, Object value) { + CAFFEINE.invalidate(getUniqueKey(key)); cache.put(key, value); } public ValueWrapper putIfAbsent(Object key, Object value) { + CAFFEINE.invalidate(getUniqueKey(key)); return cache.putIfAbsent(key, value); }