diff --git a/README.md b/README.md index 9b06979b..f8a7a236 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ feature flagging and experimentation for Eppo customers. An API key is required ```groovy dependencies { - implementation 'cloud.eppo:android-sdk:4.10.2' + implementation 'cloud.eppo:android-sdk:4.11.0' } dependencyResolutionManagement { diff --git a/eppo/build.gradle b/eppo/build.gradle index b28d44c0..51fa7fe3 100644 --- a/eppo/build.gradle +++ b/eppo/build.gradle @@ -7,7 +7,7 @@ plugins { } group = "cloud.eppo" -version = "4.10.3-SNAPSHOT" +version = "4.11.0-SNAPSHOT" android { buildFeatures.buildConfig true @@ -68,7 +68,7 @@ ext.versions = [ ] dependencies { - api 'cloud.eppo:sdk-common-jvm:3.12.2' + api 'cloud.eppo:sdk-common-jvm:3.13.0' implementation 'org.slf4j:slf4j-api:2.0.17' diff --git a/eppo/src/main/java/cloud/eppo/android/cache/LRUAssignmentCache.java b/eppo/src/main/java/cloud/eppo/android/cache/LRUAssignmentCache.java index ece5e918..96d74c03 100644 --- a/eppo/src/main/java/cloud/eppo/android/cache/LRUAssignmentCache.java +++ b/eppo/src/main/java/cloud/eppo/android/cache/LRUAssignmentCache.java @@ -20,6 +20,19 @@ public void put(String cacheKey, @NonNull String serializedEntry) { public String get(String cacheKey) { return cache.get(cacheKey); } + + @Override + public boolean putIfAbsent(String cacheKey, @NonNull String serializedEntry) { + boolean hadNoPreviousEntry; + synchronized (cache) { + String entry = cache.get(cacheKey); + hadNoPreviousEntry = entry == null; + if (hadNoPreviousEntry) { + cache.put(cacheKey, serializedEntry); + } + } + return hadNoPreviousEntry; + } }); } }