# Cache tags

> Label cached responses with the Cache-Tag header from your origin and purge every object with a tag in one call.

A **cache tag** is a label your origin attaches to a response. Later you can [purge by tag](https://developers.openwaf.dev/cache/purge/) and remove every cached object that carries it, whatever its URL. Tags suit content that appears on many pages: a product shown on its own page, in listings and in search results.

## Send tags from your origin

Add a `Cache-Tag` header with one or more comma-separated tags:

```http
HTTP/1.1 200 OK
Content-Type: text/html
Cache-Control: public, max-age=600
Cache-Tag: product-42, category-shoes, home
```

- Tags are case-insensitive: the edge stores them in lower case.
- Spaces around commas are ignored; each tag can be up to 1024 characters. Several `Cache-Tag` headers add up.
- The edge removes `Cache-Tag` before the response reaches the visitor.
- Tags are read when the object is stored. Adding tags to your origin doesn't tag objects already in the cache.

## Purge by tag

```sh
openwaf-cloud ctl cache purge example.com --tag product-42 --reason "price changed"
```

Every object of the zone with that tag, on every name, is removed. See [Purge the cache](https://developers.openwaf.dev/cache/purge/) for the dashboard, API and MCP.
