初始化

This commit is contained in:
2025-04-16 17:47:42 +08:00
parent 92158cdd91
commit a5dd676a0a
6 changed files with 8 additions and 10 deletions

View File

@@ -70,11 +70,11 @@ public class CacheAutoConfiguration {
@Bean
public RedisCacheManager redisCacheManager(RedisTemplate<String, Object> redisTemplate,
RedisCacheConfiguration redisCacheConfiguration,
CacheProperties yudaoCacheProperties) {
CacheProperties cacheProperties) {
// 创建 RedisCacheWriter 对象
RedisConnectionFactory connectionFactory = Objects.requireNonNull(redisTemplate.getConnectionFactory());
RedisCacheWriter cacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(connectionFactory,
BatchStrategies.scan(yudaoCacheProperties.getRedisScanBatchSize()));
BatchStrategies.scan(cacheProperties.getRedisScanBatchSize()));
// 创建 TenantRedisCacheManager 对象
return new TimeoutRedisCacheManager(cacheWriter, redisCacheConfiguration);
}