---
name: "onOfflineDpsUpdate"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.1.0" }
title: "onOfflineDpsUpdate - Listen for offline DP cache updates."
summary: "Fires when local cache refreshes, for example after the device pulls offline tasks."
---

## onOfflineDpsUpdate

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

### Description

Listen for offline DP updates

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `callback` | `(dps: OfflineDps) => void` | Yes | Event callback |

### Return Value

None


### Referenced Types

##### `interface` OfflineDps

```typescript
export interface OfflineDps {
  [code: string]: OfflineDpInfo;
}
```


### Examples

#### Example

```ts
import { onOfflineDpsUpdate } from '@ray-js/lock-sdk';
onOfflineDpsUpdate((dps) => {
  console.log('Offline DP update', dps);
});
```
