## MedplumClient.getCachedReference() method

Returns a cached resource if it is available.

**Signature:**

```typescript
getCachedReference<T extends Resource>(reference: Reference<T>): WithId<T> | undefined;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| reference | Reference<T> | The FHIR reference. |

**Returns:**

[WithId](/content/docs/sdk/core.withid) <T> | undefined

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