> ## Documentation Index
> Fetch the complete documentation index at: https://developers.aptranet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Purge and prefetch

> Invalidate cached content, warm selected paths, and inspect operation history.

Use purge after removing or correcting cached content. Use prefetch to request known paths into the edge delivery system before expected traffic.

## Purge modes

| Mode | Scope |
| - | - |
| `all` | All cached content for the distribution |
| `urls` | Exact paths supplied in `paths` |
| `patterns` | Paths matching supplied patterns |

Prefer exact URLs. An all-content purge increases origin load and removes useful cache entries.

```bash theme={null}
curl --request POST \
  --url https://api.aptranet.com/cloud-cdn/tools/purge \
  --header "Authorization: Bearer $APTRANET_ACCESS_KEY" \
  --header "Aptranet-Secret: $APTRANET_SECRET" \
  --header "Content-Type: application/json" \
  --data '{
    "distribution_id": 73,
    "mode": "urls",
    "paths": ["/assets/app.8f3c.css", "/catalog/products.json"]
  }'
```

## Prefetch

Prefetch requires a distribution ID and one or more paths. Use it for a controlled set of high-demand objects, not an unbounded site crawl.

## History

Purge and prefetch history includes the operation type, distribution, paths, status, error message, requester, and timestamp. A successful API acceptance does not guarantee every path was valid; review history for the final result.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.