← NetlifyCONTENT HISTORY

Update to Netlify

Snapshot Sep 30, 2026 · 23:18 UTC · version 1.0.0

Collection source: not recorded for this historical snapshot. These snapshots do not have a confirmed matching collection source. Differences in file lists alone do not establish changes to the package.

WHAT CHANGED · RULE-BASED ANALYSIS

Supporting file metadata differs

Newly listed paths: LICENSE.txt, agents/openai.yaml. This compares saved file lists, not package contents; a different collection source can change the list.

Observed in package metadata. These changes alone do not establish a new customer-facing feature.

Supporting files

Before

[{"relative_path":"assets/netlify-small.svg","size_in_bytes":1291},{"relative_path":"assets/netlify.png","size_in_bytes":2686}]

After

[{"relative_path":"LICENSE.txt","size_in_bytes":10776},{"relative_path":"agents/openai.yaml","size_in_bytes":351},{"relative_path":"assets/netlify-small.svg","size_in_bytes":1291},{"relative_path":"assets/netlify.png","size_in_bytes":2686}]

Compare saved observations

Download comparison JSON
Full technical diff · 1 changed fields

changed /included_files

BEFORE
[
  {
    "relative_path": "assets/netlify-small.svg",
    "size_in_bytes": 1291
  },
  {
    "relative_path": "assets/netlify.png",
    "size_in_bytes": 2686
  }
]
AFTER
[
  {
    "relative_path": "LICENSE.txt",
    "size_in_bytes": 10776
  },
  {
    "relative_path": "agents/openai.yaml",
    "size_in_bytes": 351
  },
  {
    "relative_path": "assets/netlify-small.svg",
    "size_in_bytes": 1291
  },
  {
    "relative_path": "assets/netlify.png",
    "size_in_bytes": 2686
  }
]
Full snapshot data
{
  "name": "netlify-caching",
  "description": "Guide for controlling caching on Netlify's CDN. Use when configuring cache headers, setting up stale-while-revalidate, implementing on-demand cache purge, or understanding Netlify's CDN caching behavior. Covers Cache-Control, Netlify-CDN-Cache-Control, cache tags, durable cache, and framework-specific caching patterns.",
  "included_files": [
    {
      "relative_path": "LICENSE.txt",
      "size_in_bytes": 10776
    },
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 351
    },
    {
      "relative_path": "assets/netlify-small.svg",
      "size_in_bytes": 1291
    },
    {
      "relative_path": "assets/netlify.png",
      "size_in_bytes": 2686
    }
  ],
  "skill_md_contents": "---\nname: netlify-caching\ndescription: Guide for controlling caching on Netlify's CDN. Use when configuring cache headers, setting up stale-while-revalidate, implementing on-demand cache purge, or understanding Netlify's CDN caching behavior. Covers Cache-Control, Netlify-CDN-Cache-Control, cache tags, durable cache, and framework-specific caching patterns.\n---\n\n# Caching on Netlify\n\n## Default Behavior\n\n**Static assets** are cached automatically:\n- CDN: cached for 1 year, invalidated on every deploy\n- Browser: always revalidates (`max-age=0, must-revalidate`)\n- No configuration needed\n\n**Dynamic responses** (functions, edge functions, proxied) are **not cached by default**. Add cache headers explicitly.\n\n## Cache-Control Headers\n\nThree headers control caching, from most to least specific:\n\n| Header | Who sees it | Use case |\n|---|---|---|\n| `Netlify-CDN-Cache-Control` | Netlify CDN only (stripped before browser) | CDN-only caching |\n| `CDN-Cache-Control` | All CDN caches (stripped before browser) | Multi-CDN setups |\n| `Cache-Control` | Browser and all caches | General caching |\n\n### Common Patterns\n\n```typescript\n// Cache at CDN for 1 hour, browser always revalidates\nreturn new Response(body, {\n  headers: {\n    \"Netlify-CDN-Cache-Control\": \"public, s-maxage=3600, must-revalidate\",\n    \"Cache-Control\": \"public, max-age=0, must-revalidate\",\n  },\n});\n\n// Stale-while-revalidate (serve stale for 2 min while refreshing)\nreturn new Response(body, {\n  headers: {\n    \"Netlify-CDN-Cache-Control\": \"public, max-age=60, stale-while-revalidate=120\",\n  },\n});\n\n// Durable cache (shared across edge nodes, serverless functions only)\nreturn new Response(body, {\n  headers: {\n    \"Netlify-CDN-Cache-Control\": \"public, durable, max-age=60, stale-while-revalidate=120\",\n  },\n});\n```\n\n### Immutable Assets\n\nFor fingerprinted files (hash in filename):\n\n```toml\n# netlify.toml\n[[headers]]\nfor = \"/assets/*\"\n[headers.values]\nCache-Control = \"public, max-age=31536000, immutable\"\n```\n\n## Cache Tags and On-Demand Purge\n\nTag responses for selective cache invalidation:\n\n```typescript\nreturn new Response(body, {\n  headers: {\n    \"Netlify-Cache-ID\": \"product,listing\",\n    \"Netlify-CDN-Cache-Control\": \"public, s-maxage=86400\",\n  },\n});\n```\n\nPurge by tag:\n\n```typescript\nimport { purgeCache } from \"@netlify/functions\";\n\nexport default async () => {\n  await purgeCache({ tags: [\"product\"] });\n  return new Response(\"Purged\", { status: 202 });\n};\n```\n\nPurge entire site:\n\n```typescript\nawait purgeCache();\n```\n\nResponses with `Netlify-Cache-ID` are **excluded from automatic deploy-based invalidation** — they must be purged explicitly.\n\n## Cache Key Variation\n\nCustomize what creates separate cache entries:\n\n```typescript\nreturn new Response(body, {\n  headers: {\n    \"Netlify-Vary\": \"cookie=ab_test|is_logged_in\",\n    // Other options: query=param1|param2, header=X-Custom, country=us|de, language=en|fr\n  },\n});\n```\n\n## Framework-Specific Caching\n\n### Next.js\nISR uses Netlify's durable cache automatically (runtime 5.5.0+). `revalidatePath` and `revalidateTag` trigger cache purge.\n\n### Astro / Remix\nFull control over cache headers in server routes. Set `Netlify-CDN-Cache-Control` in responses for CDN caching.\n\n### Nuxt\nDefault Nitro preset handles caching. ISR-style patterns use `routeRules` with `swr` or `isr` options.\n\n### Vite SPA\nStatic assets are cached by default. API responses from Netlify Functions need explicit cache headers.\n\n## Debugging\n\nCheck the `Cache-Status` response header:\n- `HIT` — served from cache\n- `MISS` — generated fresh\n- `REVALIDATED` — stale content was revalidated\n\n## Constraints\n\n- Basic auth disables caching for the entire site\n- Durable cache is serverless functions only (not edge functions)\n- Same URL must return identical `Netlify-Vary` headers across responses\n- Deploy invalidation is scoped to deploy context (production vs preview)\n"
}

SHA-256: a34c4c8186e4584329e982365a42b40b00f50d9efefe379d591cc1ca232d40a1