---
url: /process-functions/datasource-cacheget.md
description: Returns a value from the server-wide in-memory cache.
---

# datasource.cacheGet

Returns a value from the server-wide in-memory cache.

```js
datasource.cacheGet(key)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `key` | `string` | The key. |

## Returns

The stored value, or `null` when the key isn't in the cache or has expired.

## Examples

```js
const token = datasource.cacheGet("apiToken");
```
