© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•3y ago•
3 replies
nickchomey

Confused about Caching with Fetch API within Workers

I would like to cache requests made from the Workers Fetch API in the Tiered Cache, which can then be periodically purged globally by URL.

This page (https://developers.cloudflare.com/workers/learning/how-the-cache-works/#interacting-with-the-cloudflare-cache) says that all fetches are cached automatically, IF they are proxied through Cloudflare. And the caching can be further customized by operating on the
cf
cf
object, as in this example https://developers.cloudflare.com/workers/examples/cache-using-fetch/

However, my question is whether it would get cached if I
a) do not own the site, and/or
b) it is not an active zone on Cloudflare

I ask this because in this section (https://developers.cloudflare.com/workers/learning/how-the-cache-works/#single-file-purge--assets-cached-by-a-worker) of the same Workers Cache documentation, it shows a decision tree for cache purging.

1. If the page is not an active CF zone, it can be purged (but how was it cached to begin with?)
2. If it is an active CF zone, but not proxied, it can be purged (again, how was it cached to begin with?)
3. If it is proxied and you own it, you can purge it
4. If you do not own it, it cannot be purged

I think I am confused because it isn't clear how a page that isn't active or proxied (1 and 2) can be cached in the first place. Moreover, why can those be purged but #4 can't?

Surely I'm missing something fundamental about how this all works. I hope someone can clarify for me!
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

Confused about caching
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Confused about prod workers environment variables
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Workers caching and sec-fetch-mode: navigate
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
5mo ago
Caching worker responses in Tiered Caching with Fetch API, similar to Cache API.
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
11mo ago