jetcache 本地缓存超过expire阈值为失效

egmofgnx  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(29)

您好:
version 取值范围1~11,当version=1,6值取值一直时返回缓存数据,其他枚举值已经返回新数据,配置已经更新超过12个小时,在准生产环境重新部署没问题,个人猜测应该是local缓存未过期导致,如果是remote(redis)应该准生产环境也有问题。
问题代码:
@cached(name = "BaseConfigService.getConfig", expire = 300,cacheType = CacheType.BOTH)
public Map geConfig(String type,String version) {
}
版本:

com.github.ben-manes.caffeine
caffeine
2.7.0

com.alicp.jetcache
jetcache-starter-redis
2.5.11

配置:
jetcache:
statIntervalMinutes: 1
areaInCacheName: false
local:
default:
type: caffeine
limit: 100
keyConvertor: fastjson
expireAfterWriteInMillis: 60000
remote:
default:
type: redis
keyConvertor: fastjson
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 100
max-wait: 1000
timeout: 500
host: ${spring.redis.host}
port: ${spring.redis.port}

baubqpgj

baubqpgj1#

你可以看下本地日志里面输出的每分钟统计信息

相关问题