Skip to content

Commit

Permalink
Caffeine cache bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodforGod committed Aug 8, 2023
1 parent 3ec053e commit d18eff8
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ru.tinkoff.kora.cache.caffeine;

import org.jetbrains.annotations.ApiStatus.Internal;
import reactor.core.publisher.Mono;

import javax.annotation.Nonnull;
Expand All @@ -11,7 +10,6 @@
import java.util.Set;
import java.util.function.Function;

@Internal
public abstract class AbstractCaffeineCache<K, V> implements CaffeineCache<K, V> {

private final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

//TODO caffeine metrics???
public final class CaffeineCacheTelemetry {

private static final String ORIGIN = "caffeine";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ru.tinkoff.kora.cache.redis;

import org.jetbrains.annotations.ApiStatus.Internal;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import ru.tinkoff.kora.cache.Cache;
Expand All @@ -12,7 +11,6 @@
import java.util.function.Function;
import java.util.stream.Collectors;

@Internal
public abstract class AbstractRedisCache<K, V> implements Cache<K, V> {

private final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@
import io.lettuce.core.cluster.RedisClusterClient;
import io.lettuce.core.cluster.RedisClusterURIUtil;
import io.lettuce.core.protocol.ProtocolVersion;
import org.jetbrains.annotations.ApiStatus.Internal;

import javax.annotation.Nonnull;
import java.net.URI;
import java.time.Duration;
import java.util.List;

@Internal
public final class LettuceClientFactory {

@Nonnull
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ dependencyResolutionManagement { DependencyResolutionManagement it ->

library('lettuce-core', 'io.lettuce', 'lettuce-core').version('6.2.0.RELEASE')

library('caffeine', 'com.github.ben-manes.caffeine', 'caffeine').version('3.1.1')
library('caffeine', 'com.github.ben-manes.caffeine', 'caffeine').version('3.1.7')

library("awaitility", "org.awaitility", "awaitility").version("4.2.0")
library("junit-jupiter", "org.junit.jupiter", "junit-jupiter").version("5.9.1")
Expand Down
4 changes: 3 additions & 1 deletion micrometer/micrometer-module/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dependencies {
api libs.micrometer.registry.prometheus
api libs.prometheus.jmx.collector
api libs.opentelemetry.semconv
api(libs.prometheus.collector.caffeine) {
exclude group: "com.github.ben-manes.caffeine"
}
annotationProcessor project(':config:config-annotation-processor')

compileOnly project(':http:http-server-common')
Expand All @@ -16,5 +19,4 @@ dependencies {
compileOnly project(':resilient:resilient-kora')
compileOnly project(':cache:cache-common')
compileOnly project(':cache:cache-caffeine')
compileOnly libs.prometheus.collector.caffeine
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,6 @@ default MicrometerCacheMetrics micrometerCacheMetrics(MeterRegistry meterRegistr
return new MicrometerCacheMetrics(meterRegistry);
}

@DefaultComponent
default MicrometerCacheMetrics micrometerCaffeineCacheMetrics(MeterRegistry meterRegistry) {
return new MicrometerCacheMetrics(meterRegistry);
}

@DefaultComponent
default CacheMetricsCollector cacheMetricsCollector() {
return new CacheMetricsCollector().register();
Expand Down

0 comments on commit d18eff8

Please sign in to comment.