Cloudflare changelogs | Developer platform

Cloudflare changelogs for Developer platform products

马上订阅 Cloudflare changelogs | Developer platform RSS 更新: https://developers.cloudflare.com/changelog/rss/developer-platform.xml

Workers - Requests made from Cloudflare Workers can now force a revalidation of their cache with the origin

2025年8月7日 08:00
Workers

By setting the value of the cache property to no-cache, you can force Cloudflare's cache to revalidate its contents with the origin when making subrequests from Cloudflare Workers.

  • JavaScript

    export default {
    async fetch(req, env, ctx) {
    const request = new Request("https://cloudflare.com", {
    cache: "no-cache",
    });
    const response = await fetch(request);
    return response;
    },
    };
  • TypeScript

    export default {
    async fetch(req, env, ctx): Promis...

    剩余内容已隐藏

    查看完整文章以阅读更多