diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java index 8df91adfa23..81b0871b91b 100644 --- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java +++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/util/MemoryCacheService.java @@ -68,7 +68,7 @@ private void populateCaches() { case CONCEPT_TRANSLATION_REVERSE: timeoutSeconds = SECONDS.convert(myStorageSettings.getTranslationCachesExpireAfterWriteInMinutes(), MINUTES); - maximumSize = 10000; + maximumSize = 500000; break; case PID_TO_FORCED_ID: case FORCED_ID_TO_PID: @@ -200,6 +200,12 @@ public enum CacheEnum { * Value type: {@literal Optional} */ PID_TO_FORCED_ID(Long.class), + /** + * TODO: JA this is duplicate with the CachingValidationSupport cache. + * A better solution would be to drop this cache for this item, and to + * create a new CachingValidationSupport implementation which uses + * the MemoryCacheService for all of its caches. + */ CONCEPT_TRANSLATION(TranslationQuery.class), MATCH_URL(String.class), CONCEPT_TRANSLATION_REVERSE(TranslationQuery.class), diff --git a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java index 27b39717233..7edb7effd39 100644 --- a/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java +++ b/hapi-fhir-validation/src/main/java/org/hl7/fhir/common/hapi/validation/support/CachingValidationSupport.java @@ -79,7 +79,7 @@ public CachingValidationSupport( myExpandValueSetCache = CacheFactory.build(theCacheTimeouts.getExpandValueSetMillis(), 100); myValidateCodeCache = CacheFactory.build(theCacheTimeouts.getValidateCodeMillis(), 5000); myLookupCodeCache = CacheFactory.build(theCacheTimeouts.getLookupCodeMillis(), 5000); - myTranslateCodeCache = CacheFactory.build(theCacheTimeouts.getTranslateCodeMillis(), 500000); + myTranslateCodeCache = CacheFactory.build(theCacheTimeouts.getTranslateCodeMillis(), 5000); myCache = CacheFactory.build(theCacheTimeouts.getMiscMillis(), 5000); myNonExpiringCache = Collections.synchronizedMap(new HashMap<>());