From ecc4a18e4056021925d3edf74337bfe8f5359da6 Mon Sep 17 00:00:00 2001 From: Francesco Ranieri Date: Fri, 8 Mar 2024 19:51:49 +0100 Subject: [PATCH] =?UTF-8?q?Changed=20the=20constant=20name=20representing?= =?UTF-8?q?=20the=20default=20Time-to-Live=20(TTL)=E2=80=A6=20(#3186)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Changed the constant name representing the default Time-to-Live (TTL) for local response caches. * Changed the log message to reflect the actual value of Time-to-Live (TTL) for local response caches. --------- Co-authored-by: Francesco Ranieri --- .../factory/cache/LocalResponseCacheProperties.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/cache/LocalResponseCacheProperties.java b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/cache/LocalResponseCacheProperties.java index 33a27b03..1aead89a 100644 --- a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/cache/LocalResponseCacheProperties.java +++ b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/cache/LocalResponseCacheProperties.java @@ -34,7 +34,7 @@ public class LocalResponseCacheProperties { private static final Log LOGGER = LogFactory.getLog(LocalResponseCacheProperties.class); - private static final Duration DEFAULT_CACHE_TTL_SECONDS = Duration.ofMinutes(5); + private static final Duration DEFAULT_CACHE_TTL_MINUTES = Duration.ofMinutes(5); private DataSize size; @@ -53,9 +53,9 @@ public class LocalResponseCacheProperties { public Duration getTimeToLive() { if (timeToLive == null) { LOGGER.debug(String.format( - "No TTL configuration found. Default TTL will be applied for cache entries: %s seconds", - DEFAULT_CACHE_TTL_SECONDS)); - return DEFAULT_CACHE_TTL_SECONDS; + "No TTL configuration found. Default TTL will be applied for cache entries: %s minutes", + DEFAULT_CACHE_TTL_MINUTES)); + return DEFAULT_CACHE_TTL_MINUTES; } else { return timeToLive;