Cloudflare provides an unlimited number of scripts for Workers for Platforms customers.
The cf object contains Cloudflare-specific properties of a request. This field is not accessible in user Workers by default because some fields in this object are sensitive and can be used to manipulate Cloudflare features (for example, cacheKey, resolveOverride, scrapeShield).
In the default untrusted mode, this also applies to outgoing requests. Any cf properties a user Worker sets on a fetch() subrequest are ignored, and the subrequest uses the default cache behavior for its URL.
This includes the standard cache option of fetch() and Request. Workers implement cache: 'no-store' and cache: 'no-cache' as cf cache settings, so in untrusted mode they do not change how the subrequest is cached:
// In a user Worker in an untrusted dispatch namespace:
await fetch("https://example.com/file.bin", { method: "HEAD", cache: "no-store" });
// The cache is not bypassed. Because .bin is a default cached file extension,
// the request goes through the cache and reaches the origin as a GET.The Cache-Control: no-cache and Pragma: no-cache request headers that these options add are still sent to the origin, but they do not affect whether Cloudflare's cache handles the request. When a subrequest goes through the cache, HEAD requests can be sent to the origin as GET and the Range header can be removed. Refer to HEAD requests (/cache/concepts/cache-behavior/#interaction-of-head-requests-with-cache) and Range requests (/cache/reference/range-requests/). To use cf properties or the cache option in user Workers, either:
- Enable trusted mode (/cloudflare-for-platforms/workers-for-platforms/reference/worker-isolation/#trusted-mode) for your namespace. Only enable this if you control all Worker code in the namespace.
- Set the cache options in an Outbound Worker (/cloudflare-for-platforms/workers-for-platforms/configuration/outbound-workers/), which runs as your platform's Worker rather than the user Worker.
Workers for Platforms do not have a limit for the number of Durable Object namespaces.
For isolation, caches.default is disabled for namespaced scripts. To learn more about the cache, refer to How the cache Works.
You can set a maximum of eight tags per script. Avoid special characters like , and & when naming your tag.
Gradual Deployments is not supported yet for user Workers. Changes made to user Workers create a new version that deployed all-at-once to 100% of traffic.
| Type | Limit |
|---|---|
| Client API per user/account token | 1200/5 minutes |
| Client API per IP | 200/second |
| GraphQL | Varies by query cost. Max 320/5 min |
| User API tokens per user | 50 |
| Account API tokens per account | 500 |
Some specific API calls have their own limits and are documented separately, such as the following:
Enterprise customers can also contact Cloudflare Support to raise the Client API per user, GraphQL, or API token limits to a higher value.