---
title: In-Memory
description: Process-local provider for tests and short-lived local development.
order: 57
---

# In-Memory

In-memory mode is useful for tests, demos, and fast local iteration.

It does not provide shared state across processes.

## Registration

```csharp
builder.Services.AddDurableStack(options =>
{
    options.UseInMemory();
    options.WorkerName = $"local-{Environment.ProcessId}";
});
```

## Behavior

- No external database required.
- Job/run state exists only in process memory.
- Data is lost on process restart.

## Important limitations

- Not durable across restarts.
- Not valid for distributed multi-worker execution.
- Default run retention is 1 hour (vs 24 hours for durable DB providers).
