You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This application is broken up into three [Workers](https://developers.cloudflare.com/workers/), three
19
+
[Queues](https://developers.cloudflare.com/queues/), and one [D1](https://developers.cloudflare.com/d1/) database.
20
+
21
+
### Workers
22
+
23
+
#### [Watcher](./workers/watcher/)
24
+
25
+
This worker watches requests to the Cloudflare Cache / Origin, captures the tags, and sends them to the
26
+
[Controller](./workers/controller/) in order to be persisted.
27
+
28
+
> [!IMPORTANT]
29
+
> By the time a response from an origin reaches a [Worker](https://developers.cloudflare.com/workers/), Cloudflare
30
+
> has already swallowed the `Cache-Tag` header and it is not longer available. To get around this, the worker reads the
31
+
> custom `X-Cache-Tag` header instead.
32
+
33
+
The worker also exposes a `/.cloudflare/purge` endpoint that allows tags to be purged. This endpoint matches the
34
+
[interface of the Cloudflare endpoint](https://developers.cloudflare.com/api/operations/zone-purge#purge-cached-content-by-tag-host-or-prefix), but only allows `tags`. The tags that are purged will be scoped
35
+
to the zone in which the request is made too. For example, a purge request to `https://example.com/.cloudflare/purge`
36
+
would only purge resources from the `example.com` zone.
0 commit comments