diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6341-expand-translation-cache.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6341-expand-translation-cache.yaml new file mode 100644 index 00000000000..e0e592c0d4a --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6341-expand-translation-cache.yaml @@ -0,0 +1,6 @@ +--- +type: change +issue: 6341 +title: "The CachingValidationSupport cache for concept translations will + now keep up to 500000 translations instead of the previous 5000. + This will be made configurable in a future release." 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 @@ public class MemoryCacheService { 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 class MemoryCacheService { * 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),