From 0a332e2719b2d03f7a1a745bcdab9cc03ce66419 Mon Sep 17 00:00:00 2001 From: Will Ezell Date: Thu, 21 Nov 2024 10:45:19 -0500 Subject: [PATCH] feat(cache) per object ttl for cache items. This adds TTL capibilites to our CaffineCache and really deprecates the timed cache provider. ref:#30670 --- .../enterprise/cache/provider/CacheProviderAPIImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dotCMS/src/enterprise/java/com/dotcms/enterprise/cache/provider/CacheProviderAPIImpl.java b/dotCMS/src/enterprise/java/com/dotcms/enterprise/cache/provider/CacheProviderAPIImpl.java index 540020dc0ea0..337b031828e6 100644 --- a/dotCMS/src/enterprise/java/com/dotcms/enterprise/cache/provider/CacheProviderAPIImpl.java +++ b/dotCMS/src/enterprise/java/com/dotcms/enterprise/cache/provider/CacheProviderAPIImpl.java @@ -177,10 +177,10 @@ private List getProvidersForRegion ( String group ) { } List initProviders(List cacheProviders) { - cacheProviders.forEach(provider -> { + cacheProviders.forEach(provider -> Try.run(provider::init).onFailure( - e -> Logger.error(this, "Error initializing CacheProvider [" + provider.getName() + "].", e)); - }); + e -> Logger.error(this, "Error initializing CacheProvider [" + provider.getName() + "]." + e.getMessage(), e)) + ); return cacheProviders; }