1

I have set the ttl and idleTime for cache, the cache can be remove when the app is running, however when I restart app the EvictionScheduler may not work for cache, the cache can not be clear when ttl approach.

error

@Bean
public CacheManager cacheManager(RedissonClient redissonClient) throws IOException {
    Map<String, CacheConfig> config = new HashMap<String, CacheConfig>();
    config.put(CacheNames.XinLianService_getAllAgentData, new CacheConfig(60 * 1000, 60 * 1000));
    config.put(CacheNames.XinlianRoleService_getById, new CacheConfig(2 * 60 * 1000, 60 * 1000));
    return new RedissonSpringCacheManager(redissonClient, config);
}
Asier Gomez
  • 6,034
  • 18
  • 52
  • 105
Wesly186
  • 11
  • 4

0 Answers0