This worker fetches HTML from https://httpbin.org/html and serves it.
Test whether caching at the ORIGIN affects caching at the EDGE.
Origin uses fetch(url, { cf: { cacheTtl: 3600 } })
Expected: X-Origin-Cache-Status: HIT after first request
Question: Does this help the edge worker cache it?
Origin uses plain fetch(url) - no caching
Expected: X-Origin-Cache-Status: DYNAMIC every time
This is what we've been testing so far.
Origin uses Cache API to store the response
Expected: X-Origin-Cache-Status: HIT after first request
Question: Does Cache API at origin help?
| Origin Mode | Origin Caches? | X-Origin-Cache-Status | Edge can cache? |
|---|---|---|---|
| /cached | Yes (fetch cf) | HIT (after 1st) | ??? |
| /uncached | No | DYNAMIC | ??? |
| /cached-api | Yes (Cache API) | HIT (after 1st) | ??? |
X-Origin-Request-Id - Changes if origin worker runsX-Origin-Cache-Status - HIT/MISS/DYNAMIC at originCF-Cache-Status - HIT/MISS/DYNAMIC seen by edge