diff --git a/nuxt.config.ts b/nuxt.config.ts index 1237c113..a3d53efe 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -580,6 +580,13 @@ export default defineNuxtConfig({ // takes two failed checks, so a day of stale serving on a quiet colo is // within the time the checks themselves take. '/skills/demos': edgeCache({ maxAge: 300, staleWhileRevalidate: 86400 }), + // The CLI and developer pages read no data and no session, so they change + // only on deploy, and a deploy starts a new cache key. Uncached, each view + // rendered in the Worker: 110 to 250 ms to first byte from Sydney on + // 2026-10-07, against about 65 ms for a cached page. The 36000s total + // matches the window nuxt-skew-protection keeps old chunks for. + '/cli': edgeCache({ maxAge: 3600, staleWhileRevalidate: 32400 }), + '/developers': edgeCache({ maxAge: 3600, staleWhileRevalidate: 32400 }), // The homepage is the same shape as the board: rendered signed out, no // cookie read, and fed by the same feeds, so the same lifetimes hold. A // render measured 300 to 480 ms to first byte from Sydney on 2026-10-01. diff --git a/scripts/check-edge-cache.ts b/scripts/check-edge-cache.ts index 917e54ea..244e47e8 100644 --- a/scripts/check-edge-cache.ts +++ b/scripts/check-edge-cache.ts @@ -1,8 +1,8 @@ import { checkEdgeCache } from './lib/edge-cache-check' /** - * Prove the homepage, a Skill page with its hubs, and the trending pages are - * cached at the edge and safe to cache. + * Prove the homepage, a Skill page with its hubs, the trending and demo pages, + * and the CLI and developer pages are cached at the edge and safe to cache. * * pnpm production:edge-cache * EDGE_CACHE_BASE_URL=https://skilld.dev pnpm production:edge-cache diff --git a/scripts/lib/edge-cache-check.ts b/scripts/lib/edge-cache-check.ts index bad06da1..397275ef 100644 --- a/scripts/lib/edge-cache-check.ts +++ b/scripts/lib/edge-cache-check.ts @@ -26,7 +26,7 @@ import { DEFAULT_TRENDING_RANGE } from '../../shared/trending-range' * cache key. One long-lived Skill, its repo hub and its owner hub stand for * every page under the `/gh/:owner/:repo/:name` rule. */ -export const EDGE_CACHED_PATHS = ['/', '/gh/anthropics/skills/skill-creator', '/gh/anthropics/skills', '/gh/anthropics', '/skills/trending', '/skills/trending?range=month', '/skills/trending?range=all'] +export const EDGE_CACHED_PATHS = ['/', '/gh/anthropics/skills/skill-creator', '/gh/anthropics/skills', '/gh/anthropics', '/skills/trending', '/skills/trending?range=month', '/skills/trending?range=all', '/skills/demos', '/cli', '/developers'] const BROWSER_HEADERS = { 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',