# Warm the cache and check the headerscurl -s -o /dev/null -D - https://example.com/api/feed | grep -i cache-controlnpm run build && npm run startimport { cache } from "./cache";type Feed = { items: { id: string; title: string }[]; updatedAt: number };// Returns the cached feed while it is fresh, otherwise reloads it.export async function readFeed(load: () => Promise<Feed>, ttl = 60_000) { const cached = cache.get("feed"); if (cached && Date.now() - cached.updatedAt < ttl) { return cached; } const fresh = await load(); cache.set("feed", fresh); return fresh;}export const description = "This is a deliberately long string so the wrap toggle has something to wrap: the quick brown fox jumps over the lazy dog, again and again, until the line is much wider than the block.";export const short = 1;{ "items": [ { "id": "a1", "title": "Sample item one", "price": 24.5 }, { "id": "b2", "title": "Sample item two", "price": 38 } ], "cached": true, "ttl": 60, "note": null}export function FeedList({ items }: { items: { id: string; title: string }[] }) { if (items.length === 0) return <p className="text-muted-foreground">Nothing here yet.</p>; return ( <ul className="grid gap-1"> {items.map((item) => ( <li key={item.id}>{item.title}</li> ))} </ul> );}{ "items": [ { "id": "a1", "title": "Sample item one", "price": 24.5 }, { "id": "b2", "title": "Sample item two", "price": 38 } ], "cached": true, "ttl": 60, "note": null}