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<RT extends ResourceType>(resourceType: RT, id: string): WithId<ExtractResource<RT>> | undefined;

Parameters

Parameter

Type

Description

resourceType

RT

The FHIR resource type.

id

string

The FHIR resource ID.

Returns:

WithId<ExtractResource<RT>> | undefined

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