Commit 55f8585ea868bb49c9aa934d0446bcd968283424
1 parent
7bf21fb0
同步
Showing
2 changed files
with
3 additions
and
2 deletions
yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/redis/TenantRedisCacheManager.java
| 1 | package cn.iocoder.yudao.framework.tenant.core.redis; | 1 | package cn.iocoder.yudao.framework.tenant.core.redis; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.framework.redis.core.TimeoutRedisCacheManager; | ||
| 3 | import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; | 4 | import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; |
| 4 | import lombok.extern.slf4j.Slf4j; | 5 | import lombok.extern.slf4j.Slf4j; |
| 5 | import org.springframework.cache.Cache; | 6 | import org.springframework.cache.Cache; |
| @@ -15,7 +16,7 @@ import org.springframework.data.redis.cache.RedisCacheWriter; | @@ -15,7 +16,7 @@ import org.springframework.data.redis.cache.RedisCacheWriter; | ||
| 15 | * @author airhead | 16 | * @author airhead |
| 16 | */ | 17 | */ |
| 17 | @Slf4j | 18 | @Slf4j |
| 18 | -public class TenantRedisCacheManager extends RedisCacheManager { | 19 | +public class TenantRedisCacheManager extends TimeoutRedisCacheManager { |
| 19 | 20 | ||
| 20 | public TenantRedisCacheManager(RedisCacheWriter cacheWriter, | 21 | public TenantRedisCacheManager(RedisCacheWriter cacheWriter, |
| 21 | RedisCacheConfiguration defaultCacheConfiguration) { | 22 | RedisCacheConfiguration defaultCacheConfiguration) { |
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 { | @@ -45,7 +45,7 @@ public class TimeoutRedisCacheManager extends RedisCacheManager { | ||
| 45 | Duration duration = parseDuration(names[1]); | 45 | Duration duration = parseDuration(names[1]); |
| 46 | cacheConfig = cacheConfig.entryTtl(duration); | 46 | cacheConfig = cacheConfig.entryTtl(duration); |
| 47 | } | 47 | } |
| 48 | - return super.createRedisCache(names[0], cacheConfig); | 48 | + return super.createRedisCache(name, cacheConfig); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | /** | 51 | /** |