---
name: "getOfflineDpCache"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.1.0" }
title: "getOfflineDpCache - Get offline task info for a DP from local cache."
summary: "Reads offline task info for the given DP from local cache only (no cloud fetch)."
---

## getOfflineDpCache

> [VERSION] @ray-js/lock-sdk >= 1.1.0

### Description

Get the offline DP cache entry for the specified code

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | `string` | Yes | DP code |

### Return Value

Type: `OfflineDpInfo`

Cache entry or undefined

##### OfflineDpInfo

| Property | Type | Description |
| --- | --- | --- |
| `value` | `string \| boolean \| number` | DP value |
| `pushStatus` | `boolean` | Whether pushed |

### Examples

#### Example

```ts
import { getOfflineDpCache } from '@ray-js/lock-sdk';
const cache = getOfflineDpCache();
```
