Skip to main content

core.medplumclient.getcached

Home > @medplum/core > MedplumClient > getCached

MedplumClient.getCached() method

Returns a cached resource if it is available.

Signature:

getCached<K extends ResourceType>(resourceType: K, id: string): ExtractResource<K> | undefined;

Parameters

ParameterTypeDescription
resourceTypeKThe FHIR resource type.
idstringThe FHIR resource ID.

Returns:

ExtractResource<K> | undefined

The resource if it is available in the cache; undefined otherwise.