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
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,8 @@ wait0 caches only `GET` responses with a `2xx` status, an allowed `Content-Type`
147
147
148
148
An origin response that fails these checks is served as `X-Wait0: bypass` without being stored, with `X-Wait0-Reason` explaining why. If background revalidation receives a disallowed content type, either cache-control directive, or a non-`2xx` status, the existing entry is deleted; a network error leaves it available. A stale response is reported as `X-Wait0: hit`.
149
149
150
+
`logging.debug_headers` controls wait0 diagnostic response headers and the markers sent to the origin during revalidation. Omit it to enable every supported header, use a subset to select individual headers, or set `debug_headers: []` to disable all diagnostics. Functional headers such as `X-Wait0-CSRF` and origin-provided `X-Wait0-Tag` are not controlled by this option.
151
+
150
152
### Query parameter caching
151
153
152
154
Cache keys use only the URL path by default, so `/blog`, `/blog?page=1`, and `/blog?utm_source=email` share the same cached response. The first cold request reaches the origin with its complete query and fills the shared entry; later background refreshes omit query parameters that are not in `varyByQueryParams`.
@@ -249,6 +251,18 @@ rules:
249
251
maxRequestsAtATime: 20
250
252
251
253
logging:
254
+
# Diagnostic response headers and origin revalidation markers. Omit this
255
+
# option to enable all supported headers by default.
256
+
debug_headers:
257
+
- X-Wait0
258
+
- X-Wait0-Reason
259
+
- X-Wait0-Revalidated-At
260
+
- X-Wait0-Revalidated-By
261
+
- X-Wait0-Discovered-By
262
+
- X-Wait0-Revalidate-At
263
+
- X-Wait0-Revalidate-Entropy
264
+
# To disable every diagnostic header, replace the list above with:
265
+
# debug_headers: []
252
266
# Logs a stats snapshot at this interval; omit to disable.
Copy file name to clipboardExpand all lines: docs/api-endpoints.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,17 +50,19 @@ An origin response is cacheable only when:
50
50
51
51
`cachableContentType` defaults to `text/html` and `application/xhtml+xml`. Matching is case-insensitive and ignores media-type parameters such as `charset=utf-8`. A missing or malformed `Content-Type` is not cacheable.
52
52
53
-
## Response headers added by wait0
53
+
## Diagnostic headers added by wait0
54
54
55
55
| Header | When present | Meaning |
56
56
|--------|--------------|---------|
57
-
|`X-Wait0`|always on handled responses | Cache/proxy decision marker |
57
+
|`X-Wait0`| handled responses when enabled| Cache/proxy decision marker |
58
58
|`X-Wait0-Reason`| response bypassed or failed | Machine-readable reason the response was not cached |
59
59
|`X-Wait0-Revalidated-At`| cache `hit` with revalidation metadata | Last revalidation timestamp (RFC3339Nano) |
60
60
|`X-Wait0-Revalidated-By`| with `X-Wait0-Revalidated-At`| Revalidation source (`user`, `warmup`, `invalidate`, etc.) |
61
61
|`X-Wait0-Discovered-By`| if entry was discovery seeded | Discovery source marker |
62
62
|`Access-Control-Expose-Headers`| when wait0 headers exist | Exposes wait0 headers to browser clients |
63
63
64
+
During background revalidation, wait0 can also send `X-Wait0-Revalidate-At` and `X-Wait0-Revalidate-Entropy` to the origin. `logging.debug_headers` controls all seven diagnostic headers. Omission enables all; an explicit `debug_headers: []` disables all. A configured subset enables only the named headers. `WAIT0_SEND_REVALIDATE_MARKERS=false` remains a master disable for the two origin markers.
- Keep static assets in CDN, Nginx, and browser caches; wait0 defaults to caching only dynamic HTML/XHTML SWR responses.
175
176
- Origin `2xx` responses with `Cache-Control: no-cache` or `no-store` are not stored; either directive received during revalidation deletes the existing entry.
176
177
- Warmup loops never overlap: wait0 completes the current rule snapshot, waits `pauseBetweenRuns`, then loads a fresh snapshot.
178
+
-`logging.debug_headers` may select any of `X-Wait0`, `X-Wait0-Reason`, `X-Wait0-Revalidated-At`, `X-Wait0-Revalidated-By`, `X-Wait0-Discovered-By`, `X-Wait0-Revalidate-At`, and `X-Wait0-Revalidate-Entropy`.
179
+
- Omit `logging.debug_headers` to enable all diagnostics; set `debug_headers: []` to disable all of them.
0 commit comments