fix:增加redis缓存时间
This commit is contained in:
parent
a8b390f293
commit
e2421e2c14
|
@ -27,7 +27,7 @@ public class RedisConfiguration {
|
|||
@Bean
|
||||
public RedisCacheManager cacheManager() {
|
||||
RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig()
|
||||
.entryTtl(Duration.ofHours(2)); // 设置缓存过期时间为1小时
|
||||
.entryTtl(Duration.ofHours(6)); // 设置缓存过期时间为1小时
|
||||
return RedisCacheManager.builder(connectionFactory)
|
||||
.cacheDefaults(config)
|
||||
.build();
|
||||
|
|
Loading…
Reference in New Issue