解决Spring-Cache对redis设置过期时间问题
Spring-Cache因为支持多种缓存,每种缓存过期时间的设置方式无法统一,因此没有给出一个统一的处理方案,但是通过RedisCacheManager的源码可以找到解决方法.先上一下效果: @Cacheable(value = RedisKey.APP+"dashboardApi", cacheManager = "redisCacheManager") @CacheExpire(60) public List<NewAlertVo> newAlert(Integer
原创
2021-07-29 18:08:56 ·
2323 阅读 ·
0 评论