From edf832c94802f2b2f4f6c50aaa494b667c9cdbd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 17 May 2024 13:43:25 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BA=8C=E7=BA=A7=E7=BC=93=E5=AD=98=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E4=B8=80=E7=BA=A7=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dromara/common/redis/manager/CaffeineCacheDecorator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }