Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions scripts/check-edge-cache.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/edge-cache-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading