diff --git a/spring-caching-2/src/main/java/com/baeldung/caching/ttl/service/HotelService.java b/spring-caching-2/src/main/java/com/baeldung/caching/ttl/service/HotelService.java index abc2b18521..6e2b91b6ae 100755 --- a/spring-caching-2/src/main/java/com/baeldung/caching/ttl/service/HotelService.java +++ b/spring-caching-2/src/main/java/com/baeldung/caching/ttl/service/HotelService.java @@ -27,7 +27,7 @@ public class HotelService { } @CacheEvict(value = "hotels", allEntries = true) - @Scheduled(fixedRateString = "43200") + @Scheduled(fixedRateString = "${caching.spring.hotelListTTL}") public void emptyHotelsCache() { logger.info("emptying Hotels cache"); }