From f546d33f40c01aeb23656150ba814a02ceffeacf Mon Sep 17 00:00:00 2001 From: luodz <18113184211@189.cn> Date: Tue, 5 Sep 2023 10:41:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E5=A4=9A=E7=A7=9F=E6=88=B7=E6=97=B6=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?Redis=E7=BC=93=E5=AD=98=EF=BC=8C=E8=AE=BE=E7=BD=AE=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E6=97=B6=E9=97=B4=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/tenant/core/redis/TenantRedisCacheManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/redis/TenantRedisCacheManager.java b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/redis/TenantRedisCacheManager.java index 8058b2f54..240b9209f 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/redis/TenantRedisCacheManager.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/redis/TenantRedisCacheManager.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.tenant.core.redis; +import cn.iocoder.yudao.framework.redis.core.TimeoutRedisCacheManager; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import lombok.extern.slf4j.Slf4j; import org.springframework.cache.Cache; @@ -15,7 +16,7 @@ import org.springframework.data.redis.cache.RedisCacheWriter; * @author airhead */ @Slf4j -public class TenantRedisCacheManager extends RedisCacheManager { +public class TenantRedisCacheManager extends TimeoutRedisCacheManager { public TenantRedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration) { From 4fe865e94ea00c6fe07c62a7d40bafa694e9f139 Mon Sep 17 00:00:00 2001 From: luodz <18113184211@189.cn> Date: Tue, 5 Sep 2023 10:46:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=BA=E8=A7=A3=E5=86=B3=E5=A4=9A?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E6=97=B6Redis=E7=BC=93=E5=AD=98=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=A4=B1=E6=95=88=E6=97=B6=E9=97=B4=E4=B8=8D=E7=94=9F?= =?UTF-8?q?=E6=95=88=E9=97=AE=E9=A2=98=EF=BC=8C=E8=80=8C=E5=B0=86TimeoutRe?= =?UTF-8?q?disCacheManager=E4=BD=9C=E4=B8=BATenantRedisCacheManager?= =?UTF-8?q?=E7=9A=84=E7=88=B6=E7=B1=BB=E3=80=82=E8=BF=99=E9=87=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=90=8E=E8=AE=A9=E7=A7=9F=E6=88=B7ID=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E8=A2=AB=E4=BC=A0=E9=80=92=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/redis/core/TimeoutRedisCacheManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/core/TimeoutRedisCacheManager.java b/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/core/TimeoutRedisCacheManager.java index bf34fc081..3e40c0be6 100644 --- a/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/core/TimeoutRedisCacheManager.java +++ b/yudao-framework/yudao-spring-boot-starter-redis/src/main/java/cn/iocoder/yudao/framework/redis/core/TimeoutRedisCacheManager.java @@ -45,7 +45,7 @@ public class TimeoutRedisCacheManager extends RedisCacheManager { Duration duration = parseDuration(names[1]); cacheConfig = cacheConfig.entryTtl(duration); } - return super.createRedisCache(names[0], cacheConfig); + return super.createRedisCache(name, cacheConfig); } /**