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