Skip to content

Commit

Permalink
Context cacheLoader can never help us as we can't trigger loading fro…
Browse files Browse the repository at this point in the history
…m a cache miss directly.
  • Loading branch information
SamBarker committed Jul 19, 2023
1 parent 43cdbc1 commit 3bab12f
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package io.strimzi.kafka.topicenc.kroxylicious;

import java.time.Duration;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.kafka.common.Uuid;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.benmanes.caffeine.cache.AsyncLoadingCache;
import com.github.benmanes.caffeine.cache.Caffeine;

import io.strimzi.kafka.topicenc.policy.PolicyRepository;

Expand All @@ -23,7 +18,6 @@ public class TopicEncryptionConfig extends BaseConfig {

@JsonIgnore
private static final ConcurrentHashMap<String, TopicIdCache> virtualClusterToTopicUUIDToTopicNameCache = new ConcurrentHashMap<>();
private final ContextCacheLoader contextCacheLoader = new ContextCacheLoader();

@JsonCreator
public TopicEncryptionConfig(@JsonProperty(value = IN_MEMORY_POLICY_REPOSITORY_PROP_NAME) InMemoryPolicyRepositoryConfig inMemoryPolicyRepository) {
Expand All @@ -32,10 +26,6 @@ public TopicEncryptionConfig(@JsonProperty(value = IN_MEMORY_POLICY_REPOSITORY_P
+ " configuration is required as it is the only PolicyRepository implementation");
}

public ContextCacheLoader getContextCacheLoader() {
return contextCacheLoader;
}

public PolicyRepository getPolicyRepository() {
return inMemoryPolicyRepository.getPolicyRepository();
}
Expand Down

0 comments on commit 3bab12f

Please sign in to comment.