I am using @cacheable in springboot2.0 with redis. I have configured RedisCacheManager as follow:
@Bean public RedisCacheManager redisCacheManager(RedisConne
If you need configure different expire time for cache when using @cacheable , you can configure different CacheManager with different ttl,and specify cacheManager when using cache in your service.
@Cacheable(cacheManager = "expireOneHour", value = "onehour", key = "'_onehour_'+#key", sync = true)