Jonathan Norris | DevCycle
04/11/2023, 3:49 PMsseLastModified
time that we use to compare against the Last-Modified
header of the CDN response. We are struggling to figure out the best way to invalidate the local data center cache from the worker without triggering many new requests to the global purge cache API.
The options we see are:
- Call the global purge cache API: https://developers.cloudflare.com/cache/how-to/purge-cache/#purge-by-single-file-by-url
- Will calling DELETE on the Worker Cache API invalidate the local cache for a fetch request to the CDN? (this wasn't clear in the docs): https://developers.cloudflare.com/workers/runtime-apis/cache/#delete
- Can this be accomplished by using the cf.cacheTtl = 0
property on our fetch request or some other property (we are an enterprise customer): https://developers.cloudflare.com/workers/runtime-apis/request/#requestinitcfproperties
Thanks for your help!
Jonathan Norris