perf: 集成 Spring Cache,优化查询用户昵称性能

This commit is contained in:
2023-08-15 22:58:44 +08:00
parent 6a35c00b7a
commit b23b00d02a
4 changed files with 20 additions and 0 deletions

View File

@@ -190,6 +190,14 @@ spring:
deserialization:
# 允许反序列化不存在的属性
FAIL_ON_UNKNOWN_PROPERTIES: false
## 缓存配置(@Cacheable
cache:
type: redis
redis:
# 缓存过期时长(单位:毫秒,默认 -1表示永不过期
time-to-live: 7200000
# 是否允许缓存空值(默认 true表示允许可以解决缓存穿透问题
cache-null-values: true
--- ### 健康检查配置
management.health: