diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/client/TerminologyClientContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/client/TerminologyClientContext.java index a15139944..4d8c5d7ee 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/client/TerminologyClientContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/client/TerminologyClientContext.java @@ -51,6 +51,8 @@ public class TerminologyClientContext { } + private static boolean canUseCacheId; + private ITerminologyClient client; private boolean initialised = false; private CapabilityStatement capabilitiesStatementQuick; @@ -180,7 +182,7 @@ public class TerminologyClientContext { txCache.cacheTerminologyCapabilities(getAddress(), txcaps); } } - if (txcaps != null) { + if (txcaps != null && TerminologyClientContext.canUseCacheId) { for (TerminologyCapabilitiesExpansionParameterComponent t : txcaps.getExpansion().getParameter()) { if ("cache-id".equals(t.getName())) { setTxCaching(true); @@ -206,6 +208,13 @@ public class TerminologyClientContext { public String toString() { return client.getAddress(); } - + + public static boolean isCanUseCacheId() { + return canUseCacheId; + } + + public static void setCanUseCacheId(boolean canUseCacheId) { + TerminologyClientContext.canUseCacheId = canUseCacheId; + } }