[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / setDurableStore

# Function: setDurableStore()

> **setDurableStore**(`store`): `void`

Defined in: [flow/src/durable.ts:123](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/durable.ts#L123)

Replace the process-wide durable-snapshot store. Call once at boot to move
durability off the default in-process map onto a persistent backend so resumable
state survives a server redeploy (and is shared across instances).

## Parameters

### store

[`DurableStore`](../interfaces/DurableStore)

The store implementation to install.

## Returns

`void`

## Example

```ts
// boot: persist durable snapshots in Redis so they outlive redeploys.
setDurableStore(new CacheDurableStore(cache));
```
