# share Redis between the shop workers

In each [shop worktree](/docs/quickstart/), run:

```sh
bun run prepare:cache
```

The starter's helper uses the shared Git directory to choose one Compose project. It starts one Redis server on a Docker-assigned loopback port, then writes `.antil/redis-url` in that worktree. Keep `.antil/` gitignored.

The API receives that file through:

```yaml
REDIS_URL: {secret: .antil/redis-url}
```

The starter prefixes catalog cache keys with a hash of the worktree path. Keep that prefix when adding cached queries; two workers must not overwrite each other's results.

Run the helper in every new worktree. Stop Redis only after both workers finish:

```sh
bun run stop:cache
```

This is a Compose helper in the shop, not built-in Redis management. [Chamber recipes](/docs/chambers/recipes/) will make resources beyond Postgres part of antil's lifecycle.
