Changed the constant name representing the default Time-to-Live (TTL)… (#3186)
* 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 <francesco.ranieri@generali.com>
This commit is contained in:
committed by
GitHub
parent
f3c1f2ebd5
commit
ecc4a18e40
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user