File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11---
2- title : Force cache to revalidate with origin for subrequests made from Cloudflare Workers, with Request.cache
2+ title : Requests made from Cloudflare Workers can now force a revalidation of their cache with the origin.
33description : New runtime APIs allow you to control when subrequests revalidate cache, increasing compatibility with popular NPM packages
44products :
55 - workers
6- date : 2024 -08-07
6+ date : 2025 -08-07
77---
88
99import { Render , PackageManagers , TypeScriptExample } from " ~/components"
1010
11- You can now use the [ ` cache ` ] ( /workers/runtime-apis/request/#options ) property of the
12- [ ` Request ` ] ( /workers/runtime-apis/request/ ) to force [ Cloudflare's
13- cache] ( /workers/reference/how-the-cache-works/ ) to revalidate the cache with the origin when making
14- subrequests from [ Cloudflare Workers] ( /workers ) , by setting its value to ` no-cache ` .
11+ By setting the value of the ` cache ` property to ` no-cache ` , you can force [ Cloudflare's
12+ cache] ( /workers/reference/how-the-cache-works/ ) to revalidate, its contents with the origin when
13+ making subrequests from [ Cloudflare Workers] ( /workers ) .
1514
1615<TypeScriptExample filename = " index.ts" >
1716``` ts
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ value for the `cache` property of the Request interface. When this compatibility
1111enabled, or ` cache_option_disabled ` is set, the Workers runtime will throw a ` TypeError ` saying
1212` Unsupported cache mode: no-cache ` .
1313
14- When this flag is enabled you can instruct Cloudflare not to force its cache to revalidate its
14+ When this flag is enabled you can instruct Cloudflare to force its cache to revalidate the
1515response from a subrequest you make from your Worker using the [ ` fetch() `
1616API] ( /workers/runtime-apis/fetch/ ) :
1717
You can’t perform that action at this time.
0 commit comments