Skip to content

Commit

Permalink
feat(cache) per object ttl for cache items. This adds TTL capibilites…
Browse files Browse the repository at this point in the history
… to our CaffineCache and really deprecates the timed cache provider.

ref:#30670
  • Loading branch information
wezell committed Nov 20, 2024
1 parent d6437ca commit 4651454
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@

package com.dotcms.enterprise.cache.provider;

import com.dotcms.cache.DynamicTTLCache;
import com.dotcms.enterprise.LicenseUtil;
import com.dotcms.enterprise.license.LicenseLevel;
import com.dotmarketing.business.APILocator;
Expand All @@ -69,7 +68,6 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
* @author Jonathan Gamba
Expand All @@ -79,7 +77,7 @@ public class CacheProviderAPIImpl implements CacheProviderAPI, CacheOSGIService

private static final String CACHE_POOL_DEFAULT_CHAIN = "cache.default.chain";

// we use a cache for providers because ConcurrentHashMap has a recusion problem in its computeIfAbsent method
// we use a cache for providers because ConcurrentHashMap has a recursion problem in its computeIfAbsent method
private static final Cache<String, List<CacheProvider>> configuredChainsPerRegion = Caffeine.newBuilder().maximumSize(10000).build();
private final List<String> noLicenseProviders = List.of(CaffineCache.class.getCanonicalName());

Expand Down Expand Up @@ -124,7 +122,6 @@ private boolean isCommunity () {
* Return all the registered CacheProviders, there are cases when is required to iterate over all the Providers, like on
* a flush or a shutdown
*
* @return
*/
private List<CacheProvider> getAllProviders () {

Expand Down Expand Up @@ -164,7 +161,6 @@ private List<String> getProviderNamesPerRegion(String group){
* is heavily used!.
*
* @param group
* @return
*/
private List<CacheProvider> getProvidersForRegion ( String group ) {

Expand Down

0 comments on commit 4651454

Please sign in to comment.