{
  "type": "AgentMintBlueprint",
  "schemaVersion": "1.0",
  "slug": "edge-worker-machine-surfaces",
  "title": "Edge worker for machine surfaces",
  "description": "Two Cloudflare Worker variants for caching llms.txt and .md mirrors: the CDN path honors stale-while-revalidate; the Cache API refreshes manually.",
  "version": "1.0",
  "canonicalUrl": "https://agentmint.net/blueprints/edge-worker-machine-surfaces/",
  "markdownMirror": "https://agentmint.net/blueprints/edge-worker-machine-surfaces.md",
  "author": "Abdalsalaam Halawa",
  "datePublished": "2026-07-08",
  "dateModified": "2026-07-08",
  "lastVerified": "2026-07-08",
  "targetQuery": "cloudflare worker cache llms.txt",
  "aeoAnswer": "Serve llms.txt and .md mirrors from a Cloudflare Worker two ways: the CDN path (cf.cacheEverything) honors the origin's stale-while-revalidate; the Cache API does not, so it revalidates in the background via ctx.waitUntil.",
  "tags": [
    "cloudflare-workers",
    "caching",
    "stale-while-revalidate",
    "nginx",
    "llms-txt",
    "edge"
  ],
  "platforms": [],
  "primarySources": [
    "https://developers.cloudflare.com/workers/runtime-apis/cache/",
    "https://developers.cloudflare.com/workers/runtime-apis/handlers/fetch/",
    "https://developers.cloudflare.com/cache/concepts/revalidation/",
    "https://developers.cloudflare.com/cache/concepts/cache-control/",
    "https://nginx.org/en/docs/http/ngx_http_proxy_module.html"
  ],
  "siblings": [
    "llms-txt-for-ecommerce-catalogs",
    "product-markdown-mirror",
    "token-efficient-product-json-ld",
    "handbook/serving-agent-traffic",
    "ai-crawlers-robots-llms-txt"
  ],
  "changelog": [
    {
      "date": "2026-07-08",
      "version": "1.0",
      "note": "Initial publication."
    }
  ]
}
