# `FogOfWar.Wrapper.CacheExport`
[🔗](https://github.com/mrluc/fow/blob/main/lib/fog_of_war/wrapper/cache_export.ex#L1)

Fetches anonymous server-rendered pages and extracts their FoW regions for offline navigation. The result is a route index and gzip payloads that FoW can import into browser storage.

## How it fits

Called directly by `FogOfWar.Wrapper.NativeBundle`. `mix fow.export.cache` exposes it as a separate capture step.

# `capture!`

Extract one FoW region from a rendered response and write its gzip record. Preserve the full document for the startup route.

# `capture_origin!`

Resolve the HTTP origin to fetch, honoring the explicit capture override.

# `finish!`

Write the bundle index from the captured route records and return it.

# `paths!`

Return the distinct public routes to capture, including the startup route.

# `run!`

Capture every selected route into a fresh output directory and return the index.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
