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

Parameter

Type

Description

resourceType

K

The FHIR resource type.

id

string

The FHIR resource ID.

Returns:

ExtractResource<K> | undefined

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