changelog
This commit is contained in:
parent
e74dec1fa6
commit
1367e61c93
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
type: fix
|
||||
issue: 2758
|
||||
title: "The internal cache for tags, concepts, and others had longer or shorter expiry times that was intended.
|
||||
This has been corrected."
|
|
@ -23,13 +23,10 @@ package ca.uhn.fhir.jpa.util;
|
|||
import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
||||
import ca.uhn.fhir.jpa.api.model.TranslationQuery;
|
||||
import ca.uhn.fhir.jpa.model.entity.TagTypeEnum;
|
||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||
import com.github.benmanes.caffeine.cache.Cache;
|
||||
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.support.TransactionSynchronization;
|
||||
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||
|
@ -38,7 +35,6 @@ import javax.annotation.Nonnull;
|
|||
import javax.annotation.PostConstruct;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||
|
@ -169,7 +165,7 @@ public class MemoryCacheService {
|
|||
}
|
||||
|
||||
public void invalidateAllCaches() {
|
||||
myCaches.values().forEach(t -> t.invalidateAll());
|
||||
myCaches.values().forEach(Cache::invalidateAll);
|
||||
}
|
||||
|
||||
private <K, T> Cache<K, T> getCache(CacheEnum theCache) {
|
||||
|
|
|
@ -73,7 +73,6 @@ class MemoryCacheServiceTest {
|
|||
|
||||
// when we spill the cache, and have delayed calculation.
|
||||
final boolean[] canProceed = new boolean[]{ false };
|
||||
List<SlowFastJob> jobs = new ArrayList<>();
|
||||
List<SlowFastJob> slowJobs = new ArrayList<>();
|
||||
List<SlowFastJob> fastJobs = new ArrayList<>();
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
|
@ -85,7 +84,6 @@ class MemoryCacheServiceTest {
|
|||
} else {
|
||||
fastJobs.add(job);
|
||||
}
|
||||
jobs.add(job);
|
||||
job.submit(executor);
|
||||
}
|
||||
|
||||
|
@ -134,7 +132,9 @@ class MemoryCacheServiceTest {
|
|||
try {
|
||||
Thread.sleep(100);
|
||||
ourLog.debug("yawn " + myValue);
|
||||
} catch (InterruptedException e) { }
|
||||
} catch (InterruptedException e) {
|
||||
// empty
|
||||
}
|
||||
}
|
||||
}
|
||||
return myValue;
|
||||
|
|
Loading…
Reference in New Issue