Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersβ€’3y agoβ€’
6 replies
That Geezer

Fetch() cache behaviour

With the following, the
Response
Response
's
cf-cache-status
cf-cache-status
header is
BYPASS
BYPASS
. I was expecting to see cache headers for the specified time instead.
url
url
is a URL to a third-party API. I have a change to the data on the third party service, triggered the worker within seconds, and I saw the change immediately - I was expecting it to stay cached. I need to verify how to cache these, as it's implied in the docs it should work.

fetch(url, {
  method: "GET",
  cf: {
    cacheEverything: true,
    cacheTtl: 30,
  },
  headers: {
    "Content-Type": `application/json`,
  },
});
fetch(url, {
  method: "GET",
  cf: {
    cacheEverything: true,
    cacheTtl: 30,
  },
  headers: {
    "Content-Type": `application/json`,
  },
});


In case it matters, I am on a paid worker plan. I am using a workers.dev subdomain.
The related website in the account is on the Free plan (I am not using it for a custom domain/route for the worker).
I am testing this via Wrangler.
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Fetch with Cache metadata
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Disable edge cache in fetch
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
6mo ago
Bypassing cache from worker fetch
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
10mo ago
Workers fetch cache not working?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago