Cloudflare DevelopersCD
Cloudflare Developers7mo ago
1 reply
Khafra

Disable edge cache in fetch

I am attempting to make an api call to an external service that also appears to be using Cloudflare. Locally it works fine and I get an uncached response, but when using workers, it's returning a response with
last-modified
header of August 8.

How do I disable this cache? I have tried EVERYTHING:

cache: 'no-store'
in RequestInit
/the/api?t=${Date.now()}
query param
cf: { cacheTtl: 0, cacheEverything: false }
in RequestInit
headers: { 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache' 
} in RequestInit
image.png
image.png
Was this page helpful?