[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"verticals":3,"playground-nextjs-weekly-route-handlers-caching-streaming":44,"search-suggestions":58},[4,20,32],{"id":5,"slug":6,"name":7,"tagline":8,"description":9,"accentFrom":10,"accentTo":11,"icon":12,"defaultLocale":13,"locales":14,"features":16,"position":19},"019fe637-3d33-714b-b57f-23e163ffca0c","dev","Web Development","Read it. Run it. Prove it.","A post a day on modern web development — most with an editable playground and a quiz that explains every answer. Free, no account needed.","violet-500","cyan-400","◇","en",[13,15],"fa",{"courses":17,"paths":17,"articles":17,"exams":18,"flashcards":18,"packages":17,"community":17,"certificates":17,"teams":17,"commerce":17},true,false,0,{"id":21,"slug":22,"name":23,"tagline":24,"description":25,"accentFrom":26,"accentTo":10,"icon":27,"defaultLocale":13,"locales":28,"features":30,"position":31},"019fe637-3dc2-754c-8657-0f175bfee7c6","lang","Languages","Learn a language the way you learn a codebase.","Grammar explained the way good documentation explains an API — one idea at a time, each with a quiz.","amber-400","⌘",[13,15,29],"es",{"courses":18,"paths":18,"articles":17,"exams":18,"flashcards":17,"packages":18,"community":17,"certificates":17,"teams":18,"commerce":18},2,{"id":33,"slug":34,"name":35,"tagline":36,"description":37,"accentFrom":38,"accentTo":39,"icon":40,"defaultLocale":13,"locales":41,"features":42,"position":43},"7b3c16f2-931d-410e-802e-e1fa4edab7de","soft","Soft Skills","The half of the job nobody wrote documentation for.","Weekly, on the parts of working life that decide more than your code does — first weeks, meetings, interviews, promotions, and the people around you. Written from what actually happens, and recorded as a podcast you can listen to on the walk.","emerald-400","teal-300","◉",[13],{"courses":18,"paths":18,"articles":17,"exams":18,"flashcards":18,"packages":18,"community":17,"certificates":18,"teams":18,"commerce":18},3,{"slug":45,"title":46,"summary":47,"html":48,"css":49,"js":50,"config":51,"doc":53},"nextjs-weekly-route-handlers-caching-streaming","Next.js Route Handlers — caching across versions playground",null,"\u003Cdiv class=\"pg\">\n    \u003Ch1 class=\"pg-title\">🎮 Route Handler caching: Next.js 14 vs 16\u003C\u002Fh1>\n    \u003Cp class=\"pg-sub\">\n      This is a \u003Cstrong>model\u003C\u002Fstrong> of the documented rules, not a live Next.js server: every\n      response below is \u003Cstrong>simulated\u003C\u002Fstrong>. Pick a version, configure \u003Ccode>GET \u002Fapi\u002Fproducts\u003C\u002Fcode>,\n      change the price in the \"database\", and watch whether the response keeps up.\n    \u003C\u002Fp>\n\n    \u003Cdiv class=\"banner info show\" role=\"note\">\n      Simulated. Revalidation is simplified: here an invalidation makes the \u003Cem>next\u003C\u002Fem> request regenerate.\n      Real Next.js revalidation can serve one stale response first while it refreshes in the background.\n    \u003C\u002Fdiv>\n\n    \u003Cdiv class=\"panel\">\n      \u003Cdiv class=\"panel-label\">\u003Cspan class=\"n\">1\u003C\u002Fspan> Controls\u003C\u002Fdiv>\n\n      \u003Cdiv class=\"addr\">\n        \u003Cspan class=\"dots\">\u003Cspan>\u003C\u002Fspan>\u003Cspan>\u003C\u002Fspan>\u003Cspan>\u003C\u002Fspan>\u003C\u002Fspan>\n        \u003Ccode id=\"addrText\">GET \u002Fapi\u002Fproducts\u003C\u002Fcode>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"wrap-controls\">\n        \u003Cdiv class=\"field\">\n          \u003Cspan class=\"ctl-label\">Version \u002F caching model\u003C\u002Fspan>\n          \u003Cdiv class=\"seg\" id=\"modelSeg\">\n            \u003Cbutton aria-pressed=\"true\" data-model=\"v14\">Next.js 14\u003C\u002Fbutton>\n            \u003Cbutton aria-pressed=\"false\" data-model=\"default\">16 · default model\u003C\u002Fbutton>\n            \u003Cbutton aria-pressed=\"false\" data-model=\"cc\">16 · cacheComponents\u003C\u002Fbutton>\n          \u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n        \u003Cdiv class=\"field\">\n          \u003Cspan class=\"ctl-label\">HTTP method\u003C\u002Fspan>\n          \u003Cdiv class=\"seg\" id=\"methodSeg\">\n            \u003Cbutton aria-pressed=\"true\" data-method=\"GET\">GET\u003C\u002Fbutton>\n            \u003Cbutton aria-pressed=\"false\" data-method=\"POST\">POST\u003C\u002Fbutton>\n          \u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"wrap-controls\" style=\"margin-top:12px\">\n        \u003Cdiv class=\"field\">\n          \u003Cspan class=\"ctl-label\">Segment config export\u003C\u002Fspan>\n          \u003Cdiv class=\"seg\" id=\"segSeg\">\n            \u003Cbutton aria-pressed=\"true\" data-seg=\"none\">none\u003C\u002Fbutton>\n            \u003Cbutton aria-pressed=\"false\" data-seg=\"force-static\">dynamic = 'force-static'\u003C\u002Fbutton>\n            \u003Cbutton aria-pressed=\"false\" data-seg=\"force-dynamic\">dynamic = 'force-dynamic'\u003C\u002Fbutton>\n          \u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n        \u003Cdiv class=\"field\">\n          \u003Cspan class=\"ctl-label\">Where the data comes from\u003C\u002Fspan>\n          \u003Cdiv class=\"seg\" id=\"dataSeg\">\n            \u003Cbutton aria-pressed=\"true\" data-data=\"async\">async DB query\u003C\u002Fbutton>\n            \u003Cbutton aria-pressed=\"false\" data-data=\"sync\">sync driver (better-sqlite3)\u003C\u002Fbutton>\n            \u003Cbutton aria-pressed=\"false\" data-data=\"const\">a constant\u003C\u002Fbutton>\n          \u003C\u002Fdiv>\n        \u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"btn-row\" style=\"margin-top:12px\">\n        \u003Clabel class=\"toggle\">\n          \u003Cinput type=\"checkbox\" id=\"readsReq\" \u002F>\u003Cspan class=\"switch\">\u003C\u002Fspan>\n          \u003Cspan>Handler reads the request: \u003Ccode>cookies()\u003C\u002Fcode>, \u003Ccode>headers()\u003C\u002Fcode> or \u003Ccode>request.url\u003C\u002Fcode>\u003C\u002Fspan>\n        \u003C\u002Flabel>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"sub-controls\" id=\"ccControls\" style=\"margin-top:8px\" hidden>\n        \u003Clabel class=\"toggle\">\n          \u003Cinput type=\"checkbox\" id=\"useCache\" \u002F>\u003Cspan class=\"switch\">\u003C\u002Fspan>\n          \u003Cspan>Data comes from a helper marked \u003Ccode>\"use cache\"\u003C\u002Fcode> with \u003Ccode>cacheTag(\"products\")\u003C\u002Fcode>\u003C\u002Fspan>\n        \u003C\u002Flabel>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"code-line\" id=\"codeLine\">\u003C\u002Fdiv>\n\n      \u003Cdiv class=\"btn-row\" style=\"margin-top:14px\">\n        \u003Cbutton class=\"btn primary\" id=\"send\">Send request\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn\" id=\"changePrice\">Change DB price to $35\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn\" id=\"invalidate\">Invalidate\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn ghost\" id=\"reset\">Reset\u003C\u002Fbutton>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"presets\" style=\"margin-top:12px\">\n        \u003Cbutton class=\"btn sm\" data-preset=\"bug14\">14: the $40 bug\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn sm\" data-preset=\"plain16\">16 default: same file\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn sm\" data-preset=\"static16\">16 default: force-static\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn sm\" data-preset=\"ccQuery\">cacheComponents: DB query\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn sm\" data-preset=\"ccCache\">cacheComponents: \"use cache\"\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn sm\" data-preset=\"ccSync\">cacheComponents: sync driver\u003C\u002Fbutton>\n        \u003Cbutton class=\"btn sm\" data-preset=\"ccLeftover\">cacheComponents + leftover force-dynamic\u003C\u002Fbutton>\n      \u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n\n    \u003Cdiv class=\"panel\">\n      \u003Cdiv class=\"panel-label\">\u003Cspan class=\"n\">2\u003C\u002Fspan> What happens (simulated)\u003C\u002Fdiv>\n      \u003Cdiv class=\"flow\" id=\"flow\">\n        \u003Cdiv class=\"box\" id=\"boxBuild\">\u003Cspan class=\"ico\">🏗️\u003C\u002Fspan>next build\u003Cspan class=\"sub\" id=\"buildSub\">not run yet\u003C\u002Fspan>\u003C\u002Fdiv>\n        \u003Cdiv class=\"box\" id=\"boxHandler\">\u003Cspan class=\"ico\">🧩\u003C\u002Fspan>Route Handler\u003Cspan class=\"sub\" id=\"handlerSub\">waiting\u003C\u002Fspan>\u003C\u002Fdiv>\n        \u003Cdiv class=\"box\" id=\"boxOutcome\">\u003Cspan class=\"ico\">📦\u003C\u002Fspan>Response\u003Cspan class=\"sub\" id=\"outcomeSub\">waiting\u003C\u002Fspan>\u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"stats\">\n        \u003Cdiv class=\"stat\">DB price now\u003Cspan class=\"big-num\" id=\"dbPrice\">$40\u003C\u002Fspan>\u003C\u002Fdiv>\n        \u003Cdiv class=\"stat\" id=\"respStat\">Price in the response\u003Cspan class=\"big-num\" id=\"respPrice\">—\u003C\u002Fspan>\u003C\u002Fdiv>\n        \u003Cdiv class=\"stat\">Handler runs at request time\u003Cspan class=\"big-num\" id=\"runCount\">0\u003C\u002Fspan>\u003C\u002Fdiv>\n      \u003C\u002Fdiv>\n\n      \u003Cdiv class=\"status\" id=\"status\" style=\"margin-top:12px\">\n        \u003Cspan class=\"dot info\" id=\"dot\">\u003C\u002Fspan>\u003Cspan id=\"statusText\">Ready. Pick a preset, or configure the handler and send a request.\u003C\u002Fspan>\n      \u003C\u002Fdiv>\n      \u003Cp class=\"hint\" id=\"hint\">Try the \"14: the $40 bug\" preset: send, change the price, send again.\u003C\u002Fp>\n\n      \u003Cdiv class=\"log\" id=\"log\" style=\"margin-top:10px\" aria-live=\"polite\">\u003C\u002Fdiv>\n    \u003C\u002Fdiv>\n  \u003C\u002Fdiv>","\u002F*\n * Shared playground design system — daily-post\n * ============================================\n * Link it from any post's playground\u002Findex.html (no per-post boilerplate):\n *\n *   \u003Clink rel=\"stylesheet\" href=\"..\u002F..\u002F..\u002Fplayground\u002Fassets\u002Fbase.css\" \u002F>\n *\n * The relative path resolves the same locally (posts\u002F\u003Cbase>\u002Fplayground\u002F) and on\n * the deployed host (public\u002Fposts\u002F\u003Cbase>\u002Fplayground\u002F), because build-site.js\n * mirrors this file to public\u002Fplayground\u002Fassets\u002Fbase.css. For a CodeSandbox\n * --embed, playground.js inlines this file so the single-file sandbox still styles.\n *\n * Then write ONLY the demo-specific CSS in your inline \u003Cstyle>. Everything below\n * — tokens, layout, panels, buttons, toggles, sliders, code blocks, status\u002Flog,\n * banners, presets — comes for free and looks consistent across every post.\n *\n * Theme-aware: dark by default, light via prefers-color-scheme AND a\n * [data-theme] override on \u003Chtml> (so a toggle can force either). Accessible:\n * real focus rings, adequate contrast, reduced-motion honored.\n *\u002F\n\n\u002F* ---------- design tokens ---------- *\u002F\n:root {\n  --bg: #0d1117;\n  --bg-grid: #ffffff0a;\n  --panel: #161b22;\n  --panel-2: #0b0e14;\n  --card: #0b0e14;\n  --ink: #e8ebf2;\n  --muted: #9aa4b2;\n  --faint: #6b7688;\n  --line: #232a35;\n  --line-soft: #ffffff12;\n  --accent: #7c9cff;\n  --accent-ink: #0b0e14;\n  --good: #3fb950;\n  --warn: #f0883e;\n  --bad: #f85149;\n  --info: #58a6ff;\n  --radius: 14px;\n  --radius-sm: 9px;\n  --shadow: 0 8px 30px #0006;\n  --shadow-sm: 0 4px 14px #0005;\n  --mono: ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace;\n  --sans: ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", sans-serif;\n  color-scheme: dark;\n}\n\n\u002F* Light theme — system preference, overridable by [data-theme] on \u003Chtml>. *\u002F\n@media (prefers-color-scheme: light) {\n  :root:not([data-theme=\"dark\"]) {\n    --bg: #f4f6fb;\n    --bg-grid: #00000008;\n    --panel: #ffffff;\n    --panel-2: #f0f3f9;\n    --card: #f7f9fc;\n    --ink: #131722;\n    --muted: #5b6472;\n    --faint: #8a93a3;\n    --line: #e2e7f0;\n    --line-soft: #00000010;\n    --accent: #2f6df0;\n    --accent-ink: #ffffff;\n    --good: #1a7f37;\n    --warn: #bc4c00;\n    --bad: #cf222e;\n    --info: #0969da;\n    --shadow: 0 8px 30px #0000001f;\n    --shadow-sm: 0 4px 14px #00000014;\n    color-scheme: light;\n  }\n}\n:root[data-theme=\"light\"] {\n  --bg: #f4f6fb;\n  --bg-grid: #00000008;\n  --panel: #ffffff;\n  --panel-2: #f0f3f9;\n  --card: #f7f9fc;\n  --ink: #131722;\n  --muted: #5b6472;\n  --faint: #8a93a3;\n  --line: #e2e7f0;\n  --line-soft: #00000010;\n  --accent: #2f6df0;\n  --accent-ink: #ffffff;\n  --good: #1a7f37;\n  --warn: #bc4c00;\n  --bad: #cf222e;\n  --info: #0969da;\n  --shadow: 0 8px 30px #0000001f;\n  --shadow-sm: 0 4px 14px #00000014;\n  color-scheme: light;\n}\n\n\u002F* ---------- reset & base ---------- *\u002F\n*, *::before, *::after { box-sizing: border-box; }\n\nbody {\n  margin: 0;\n  min-height: 100vh;\n  font-family: var(--sans);\n  color: var(--ink);\n  background:\n    radial-gradient(circle at 1px 1px, var(--bg-grid) 1px, transparent 0) 0 0 \u002F 24px 24px,\n    var(--bg);\n  display: flex;\n  justify-content: center;\n  align-items: flex-start;\n  padding: clamp(14px, 3vw, 26px);\n  line-height: 1.55;\n  -webkit-font-smoothing: antialiased;\n  text-rendering: optimizeLegibility;\n}\n\n\u002F* The single content column. *\u002F\n.pg {\n  width: 100%;\n  max-width: 860px;\n}\n\n\u002F* ---------- header ---------- *\u002F\n.pg-title {\n  font-size: clamp(1.15rem, 1rem + 1vw, 1.4rem);\n  font-weight: 800;\n  letter-spacing: -0.02em;\n  margin: 0 0 4px;\n  display: flex;\n  align-items: center;\n  gap: 9px;\n}\n.pg-sub {\n  color: var(--muted);\n  font-size: 0.92rem;\n  line-height: 1.5;\n  margin: 0 0 16px;\n  max-width: 66ch;\n}\n.pg-sub strong, .pg-sub b { color: var(--ink); font-weight: 700; }\n.pg-sub code { font-family: var(--mono); background: var(--line-soft); color: var(--accent);\n  padding: 1px 6px; border-radius: 6px; font-size: 0.85em; }\n\n\u002F* ---------- panels ---------- *\u002F\n.panel {\n  background: var(--panel);\n  border: 1px solid var(--line);\n  border-radius: var(--radius);\n  padding: 16px 18px;\n  margin-bottom: 14px;\n  box-shadow: var(--shadow-sm);\n}\n.panel-label {\n  font-size: 0.7rem;\n  text-transform: uppercase;\n  letter-spacing: 0.08em;\n  color: var(--muted);\n  font-weight: 800;\n  margin: 0 0 13px;\n  display: flex;\n  align-items: center;\n  gap: 8px;\n}\n.panel-label .n {\n  display: inline-grid; place-items: center;\n  width: 18px; height: 18px; border-radius: 50%;\n  background: var(--accent); color: var(--accent-ink);\n  font-size: 0.66rem; font-weight: 800;\n}\n\n\u002F* ---------- layout helpers ---------- *\u002F\n.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }\n.row.between { justify-content: space-between; }\n.col { display: flex; flex-direction: column; gap: 10px; }\n.grow { flex: 1 1 0; min-width: 0; }\n.wrap-controls { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; }\n.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }\n.field > .label, .ctl-label {\n  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em;\n  color: var(--muted); font-weight: 800;\n}\n\n\u002F* ---------- buttons ---------- *\u002F\n.btn {\n  font: inherit; font-weight: 650; font-size: 0.88rem;\n  cursor: pointer; user-select: none;\n  border: 1px solid var(--line);\n  background: var(--card); color: var(--ink);\n  padding: 9px 15px; border-radius: var(--radius-sm);\n  display: inline-flex; align-items: center; gap: 8px;\n  transition: background .15s ease, border-color .15s ease, transform .05s ease, color .15s ease;\n}\n.btn:hover { background: var(--line-soft); border-color: var(--muted); }\n.btn:active { transform: translateY(1px); }\n.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }\n.btn[disabled] { opacity: 0.45; cursor: not-allowed; }\n.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }\n.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }\n.btn.good { background: var(--good); border-color: var(--good); color: #04140a; }\n.btn.bad  { background: var(--bad);  border-color: var(--bad);  color: #fff; }\n.btn.ghost { background: transparent; }\n.btn.sm { padding: 6px 11px; font-size: 0.82rem; }\n\n.btn-row { display: flex; flex-wrap: wrap; gap: 9px; }\n\n\u002F* Segmented control — a row of buttons where one is active (aria-pressed). *\u002F\n.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line);\n  border-radius: var(--radius-sm); padding: 3px; gap: 3px; }\n.seg button {\n  font: inherit; font-weight: 650; font-size: 0.84rem; cursor: pointer;\n  border: none; background: transparent; color: var(--muted);\n  padding: 7px 13px; border-radius: 7px;\n  transition: background .15s ease, color .15s ease;\n}\n.seg button:hover { color: var(--ink); }\n.seg button[aria-pressed=\"true\"] { background: var(--accent); color: var(--accent-ink); }\n.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }\n\n\u002F* Preset chips — worked-example shortcuts. *\u002F\n.presets { display: flex; flex-wrap: wrap; gap: 8px; }\n.presets .btn { background: var(--panel-2); }\n\n\u002F* ---------- toggle switch ---------- *\u002F\n.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer;\n  font-size: 0.88rem; font-weight: 600; user-select: none; }\n.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }\n.switch { position: relative; width: 44px; height: 25px; border-radius: 999px; flex: none;\n  background: var(--line); border: 1px solid var(--line); transition: background .18s ease; }\n.switch::after { content: \"\"; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;\n  border-radius: 50%; background: #cfd6e4; transition: transform .18s ease; box-shadow: 0 1px 3px #0006; }\n.toggle input:checked + .switch { background: var(--good); border-color: var(--good); }\n.toggle input:checked + .switch::after { transform: translateX(19px); background: #fff; }\n.toggle input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }\n\n\u002F* ---------- range slider ---------- *\u002F\ninput[type=\"range\"] {\n  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;\n  background: var(--line); border-radius: 999px; outline: none; cursor: pointer; margin: 8px 0;\n}\ninput[type=\"range\"]::-webkit-slider-thumb {\n  -webkit-appearance: none; appearance: none; width: 19px; height: 19px; border-radius: 50%;\n  background: var(--accent); border: 2px solid var(--panel); box-shadow: var(--shadow-sm); cursor: pointer;\n}\ninput[type=\"range\"]::-moz-range-thumb {\n  width: 19px; height: 19px; border-radius: 50%; background: var(--accent);\n  border: 2px solid var(--panel); box-shadow: var(--shadow-sm); cursor: pointer;\n}\ninput[type=\"range\"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }\n\n\u002F* ---------- text inputs \u002F selects ---------- *\u002F\ninput[type=\"text\"], input[type=\"number\"], input[type=\"search\"], select, textarea {\n  font: inherit; color: var(--ink); background: var(--card);\n  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 11px; width: 100%;\n}\ntextarea { font-family: var(--mono); font-size: 0.85rem; line-height: 1.6; resize: vertical; }\ninput:focus-visible, select:focus-visible, textarea:focus-visible {\n  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);\n}\n\n\u002F* ---------- status \u002F output \u002F log ---------- *\u002F\n.status {\n  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;\n  font-size: 0.9rem; font-weight: 600;\n  padding: 11px 14px; border-radius: var(--radius-sm);\n  background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);\n}\n.status.good { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); }\n.status.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }\n.status.bad  { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }\n.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }\n.dot.good { background: var(--good); } .dot.warn { background: var(--warn); }\n.dot.bad { background: var(--bad); } .dot.info { background: var(--info); }\n\n.output { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);\n  padding: 13px 15px; }\n.log { font-family: var(--mono); font-size: 0.8rem; line-height: 1.7; background: var(--card);\n  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px;\n  max-height: 220px; overflow-y: auto; white-space: pre-wrap; }\n\n\u002F* ---------- code block + syntax tokens ---------- *\u002F\n.code {\n  font-family: var(--mono); font-size: 0.82rem; line-height: 1.7;\n  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);\n  padding: 13px 15px; overflow-x: auto; white-space: pre; tab-size: 2;\n}\n.code .tok-sel  { color: var(--accent); }\n.code .tok-prop { color: #86e29b; }\n.code .tok-kw   { color: #ff9bcb; }\n.code .tok-str  { color: #f0c674; }\n.code .tok-num  { color: #f0883e; }\n.code .tok-cmt  { color: var(--faint); font-style: italic; }\n.code .hl { background: color-mix(in srgb, var(--good) 22%, transparent); border-radius: 4px; padding: 0 3px; }\n\n\u002F* ---------- hint \u002F caption ---------- *\u002F\n.hint { font-size: 0.83rem; color: var(--muted); line-height: 1.55; margin: 10px 0 0; }\n.hint code { font-family: var(--mono); color: var(--ink); background: var(--line-soft);\n  padding: 1px 5px; border-radius: 5px; font-size: 0.86em; }\n.hint strong { color: var(--ink); }\n\n\u002F* ---------- banner (feature-support \u002F notices) ---------- *\u002F\n.banner {\n  display: none; margin-bottom: 14px; padding: 11px 14px; border-radius: 11px;\n  font-size: 0.85rem; line-height: 1.5;\n  color: var(--ink); background: color-mix(in srgb, var(--warn) 12%, var(--panel));\n  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line));\n}\n.banner.show { display: block; }\n.banner.info { background: color-mix(in srgb, var(--info) 12%, var(--panel));\n  border-color: color-mix(in srgb, var(--info) 45%, var(--line)); }\n.banner code { font-family: var(--mono); background: var(--line-soft); padding: 1px 5px; border-radius: 5px; }\n\n\u002F* ---------- misc atoms ---------- *\u002F\n.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700;\n  padding: 3px 9px; border-radius: 999px; background: var(--line-soft); color: var(--muted); }\n.pill.good { color: var(--good); background: color-mix(in srgb, var(--good) 16%, transparent); }\n.pill.bad  { color: var(--bad);  background: color-mix(in srgb, var(--bad) 16%, transparent); }\n.mono { font-family: var(--mono); }\n.muted { color: var(--muted); }\n.big-num { font-family: var(--mono); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }\n\n\u002F* Optional theme toggle button (top-right). Wire it in JS if you want it. *\u002F\n.theme-btn { position: fixed; top: 12px; right: 12px; z-index: 20; }\n\n\u002F* ---------- responsive ---------- *\u002F\n@media (max-width: 560px) {\n  .panel { padding: 14px; }\n  .wrap-controls { gap: 14px; }\n  .btn { padding: 9px 13px; }\n}\n\n\u002F* ---------- reduced motion ---------- *\u002F\n@media (prefers-reduced-motion: reduce) {\n  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }\n}\n\n\n\u002F* Demo-specific only — base.css owns tokens, panels, buttons, status, log, toggle. *\u002F\n  .addr {\n    display: flex; align-items: center; gap: 8px;\n    padding: 8px 10px;\n    border: 1px solid var(--line);\n    border-radius: var(--radius-sm);\n    background: var(--panel-2);\n    font-size: 0.78rem;\n    margin-bottom: 10px;\n  }\n  .addr .dots { display: flex; gap: 4px; }\n  .addr .dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: inline-block; }\n  .addr code { color: var(--ink); }\n  .seg { flex-wrap: wrap; }\n  .flow {\n    display: grid;\n    grid-template-columns: 1fr 1fr 1fr;\n    gap: 8px;\n  }\n  .box {\n    padding: 10px 8px;\n    text-align: center;\n    border-radius: var(--radius-sm);\n    border: 1px solid var(--line);\n    background: var(--panel-2);\n    font-size: 0.76rem;\n    line-height: 1.35;\n    transition: background .25s, border-color .25s, transform .2s;\n  }\n  .box .ico { display: block; font-size: 1.15rem; margin-bottom: 3px; }\n  .box .sub { display: block; margin-top: 3px; font-size: 0.68rem; color: var(--muted); }\n  .box.wide { grid-column: 1 \u002F -1; }\n  .box.active { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 18%, var(--panel-2)); transform: translateY(-2px); }\n  .box.good { border-color: color-mix(in oklab, #34d399 55%, var(--line)); background: color-mix(in oklab, #34d399 14%, var(--panel-2)); }\n  .box.info { border-color: color-mix(in oklab, #58a6ff 55%, var(--line)); background: color-mix(in oklab, #58a6ff 14%, var(--panel-2)); }\n  .box.bad { border-color: color-mix(in oklab, #f85149 55%, var(--line)); background: color-mix(in oklab, #f85149 14%, var(--panel-2)); }\n  .stats {\n    display: grid;\n    grid-template-columns: repeat(3, 1fr);\n    gap: 8px;\n    margin-top: 10px;\n  }\n  .stat {\n    padding: 8px 10px;\n    border: 1px solid var(--line);\n    border-radius: var(--radius-sm);\n    background: var(--panel-2);\n    font-size: 0.72rem;\n    color: var(--muted);\n  }\n  .stat .big-num { display: block; font-size: 1.25rem; color: var(--ink); margin-top: 2px; }\n  .stat.stale { border-color: color-mix(in oklab, #f85149 55%, var(--line)); }\n  .stat.stale .big-num { color: #f85149; }\n  .sub-controls[hidden] { display: none; }\n  .code-line { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 6px; white-space: pre-wrap; }\n  @media (max-width: 560px) {\n    .flow, .stats { grid-template-columns: 1fr; }\n  }","\"use strict\";\n  const $ = (id) => document.getElementById(id);\n\n  const state = {\n    model: \"v14\",     \u002F\u002F \"v14\" | \"default\" | \"cc\"\n    method: \"GET\",\n    seg: \"none\",      \u002F\u002F \"none\" | \"force-static\" | \"force-dynamic\"\n    data: \"async\",    \u002F\u002F \"async\" | \"sync\" | \"const\"\n    dbPrice: 40,\n    built: false,     \u002F\u002F has the modeled `next build` run for the current config?\n    snapshot: null,   \u002F\u002F what the build (or a cache fill) saved: { price } or { constant: true }\n    runs: 0,\n  };\n\n  const readsReq = () => $(\"readsReq\").checked;\n  const useCache = () => $(\"useCache\").checked;\n\n  function log(line) {\n    const row = document.createElement(\"div\");\n    row.textContent = line;\n    $(\"log\").appendChild(row);\n    $(\"log\").scrollTop = $(\"log\").scrollHeight;\n  }\n\n  function setStatus(text, kind) {\n    $(\"statusText\").textContent = text;\n    $(\"dot\").className = \"dot \" + (kind || \"info\");\n    $(\"status\").className = \"status\" + (kind === \"good\" ? \" good\" : kind === \"bad\" ? \" bad\" : kind === \"warn\" ? \" warn\" : \"\");\n  }\n\n  function pressed(segId, attr, value) {\n    [...$(segId).querySelectorAll(\"button\")].forEach((b) =>\n      b.setAttribute(\"aria-pressed\", String(b.dataset[attr] === value))\n    );\n  }\n\n  function clearBoxes() {\n    [\"boxBuild\", \"boxHandler\", \"boxOutcome\"].forEach((id) =>\n      $(id).classList.remove(\"active\", \"good\", \"bad\", \"info\")\n    );\n  }\n\n  function describeCode() {\n    const lines = [];\n    if (state.model === \"cc\") lines.push(\"\u002F\u002F next.config.ts: cacheComponents: true\");\n    if (state.seg !== \"none\") lines.push(`export const dynamic = \"${state.seg}\";`);\n    const src = state.data === \"const\" ? 'Response.json({ projectName: \"Next.js\" })'\n      : state.model === \"cc\" && useCache() ? \"Response.json(await getProducts()) \u002F\u002F \\\"use cache\\\" helper\"\n      : state.data === \"sync\" ? \"Response.json(db.prepare(sql).all()) \u002F\u002F synchronous driver\"\n      : \"Response.json(await db.query(sql))\";\n    const req = !readsReq() ? \"\"\n      : state.model === \"v14\" ? \"  headers().get(\\\"user-agent\\\"); \u002F\u002F synchronous in 14\\n\"\n      : \"  (await headers()).get(\\\"user-agent\\\");\\n\";\n    lines.push(`export async function ${state.method}() {\\n${req}  return ${src};\\n}`);\n    $(\"codeLine\").textContent = lines.join(\"\\n\");\n  }\n\n  \u002F\u002F The documented decision, per version\u002Fmodel. Returns what a request does.\n  \u002F\u002F kind: \"error\" | \"dynamic\" | \"static\"  (static = served from a saved response)\n  function decide() {\n    const m = state.model;\n    if (m === \"cc\" && state.seg !== \"none\") {\n      return { kind: \"error\", why: \"route segments that still export dynamic, revalidate, or fetchCache error once cacheComponents is on. Delete the export.\" };\n    }\n    if (state.method !== \"GET\") {\n      return { kind: \"dynamic\", why: \"non-GET methods are never cached, in any version or model.\" };\n    }\n    if (m === \"v14\") {\n      if (state.seg === \"force-dynamic\") return { kind: \"dynamic\", why: \"force-dynamic opted this handler out of the Next.js 14 default.\" };\n      if (readsReq()) return { kind: \"dynamic\", why: \"reading the request or calling cookies()\u002Fheaders() opted it out of the Next.js 14 default.\" };\n      return { kind: \"static\", why: \"Next.js 14 caches a GET handler with the Response object by default. It was evaluated during next build.\" };\n    }\n    if (m === \"default\") {\n      if (state.seg === \"force-static\") {\n        return {\n          kind: \"static\",\n          why: \"force-static opted this GET handler into caching: evaluated once, response reused.\" +\n            (readsReq() ? \" Note: under force-static, cookies() and headers() return empty values.\" : \"\"),\n        };\n      }\n      return {\n        kind: \"dynamic\",\n        why: \"since Next.js 15, GET handlers are not cached by default.\" +\n          (state.seg === \"force-dynamic\" ? \" (force-dynamic is redundant here, a 14-era leftover.)\" : \"\"),\n      };\n    }\n    \u002F\u002F cacheComponents\n    if (readsReq()) {\n      return {\n        kind: \"dynamic\",\n        cachedHelper: useCache() && state.data !== \"const\",\n        why: \"runtime APIs like headers() stop prerendering, so the handler runs at request time.\" +\n          (useCache() && state.data !== \"const\" ? \" The \\\"use cache\\\" helper's result is still reused.\" : \"\"),\n      };\n    }\n    if (state.data === \"const\") return { kind: \"static\", why: \"it touches no uncached or runtime data, so it was prerendered at build time.\" };\n    if (useCache()) return { kind: \"static\", tagged: true, why: \"the query sits in a \\\"use cache\\\" helper, so its result is included in the prerendered response. It revalidates per cacheLife.\" };\n    if (state.data === \"sync\") return { kind: \"static\", why: \"a synchronous driver's query completes during prerendering, so the Next.js 14 bug is back. Call await connection() before the query for live data.\" };\n    return { kind: \"dynamic\", why: \"a database query stops prerendering, so the handler runs at request time.\" };\n  }\n\n  const cap = (t) => t.charAt(0).toUpperCase() + t.slice(1);\n\n  function priceText(snap) {\n    return snap.constant ? \"n\u002Fa\" : \"$\" + snap.price;\n  }\n\n  function freshSnapshot() {\n    return state.data === \"const\" ? { constant: true } : { price: state.dbPrice };\n  }\n\n  function runBuild(d) {\n    state.built = true;\n    state.snapshot = null;\n    const label = state.model === \"v14\" ? \"Next.js 14\" : state.model === \"default\" ? \"Next.js 16, default model\" : \"Next.js 16 + cacheComponents\";\n    if (d.kind === \"error\") {\n      $(\"buildSub\").textContent = \"✗ build error\";\n      $(\"boxBuild\").classList.add(\"bad\");\n      log(`✗ next build (${label}): error. ${d.why}`);\n      return;\n    }\n    if (d.kind === \"static\") {\n      state.snapshot = freshSnapshot();\n      $(\"buildSub\").textContent = \"saved a response: \" + priceText(state.snapshot);\n      $(\"boxBuild\").classList.add(\"good\");\n      log(`🏗️ next build (${label}): ran the handler once and saved the response (${priceText(state.snapshot)}).`);\n    } else {\n      $(\"buildSub\").textContent = \"nothing saved: request-time\";\n      $(\"boxBuild\").classList.add(\"info\");\n      log(`🏗️ next build (${label}): handler left for request time.`);\n    }\n  }\n\n  function showResponse(text, stale) {\n    $(\"respPrice\").textContent = text;\n    $(\"respStat\").classList.toggle(\"stale\", !!stale);\n  }\n\n  function send() {\n    clearBoxes();\n    const d = decide();\n    if (!state.built) runBuild(d);\n    else $(\"boxBuild\").classList.add(d.kind === \"error\" ? \"bad\" : d.kind === \"static\" ? \"good\" : \"info\");\n\n    $(\"boxHandler\").classList.add(\"active\");\n    log(`→ ${state.method} \u002Fapi\u002Fproducts`);\n\n    if (d.kind === \"error\") {\n      $(\"handlerSub\").textContent = \"never deployed\";\n      $(\"outcomeSub\").textContent = \"no response: the build failed\";\n      $(\"boxOutcome\").classList.add(\"bad\");\n      showResponse(\"—\", false);\n      setStatus(\"Build error (simulated): \" + d.why, \"bad\");\n      $(\"hint\").textContent = \"The Next.js 14 docs opened their Route Handler page with export const dynamic = 'force-dynamic', so this leftover is common. Under cacheComponents it isn't needed at all.\";\n      return;\n    }\n\n    if (state.method !== \"GET\") {\n      state.runs++;\n      $(\"runCount\").textContent = state.runs;\n      $(\"handlerSub\").textContent = \"runs: POST is never cached\";\n      $(\"boxHandler\").classList.add(\"info\");\n      $(\"outcomeSub\").textContent = \"201: the mutation ran\";\n      $(\"boxOutcome\").classList.add(\"info\");\n      showResponse(\"—\", false);\n      log(\"✓ POST handler ran. \" + d.why);\n      setStatus(\"Ran at request time: \" + d.why, \"\");\n      $(\"hint\").textContent = \"Even a cached GET in the same file doesn't make this POST cached.\";\n      return;\n    }\n\n    if (d.kind === \"dynamic\") {\n      state.runs++;\n      $(\"runCount\").textContent = state.runs;\n      let text;\n      if (d.cachedHelper) {\n        if (!state.snapshot) {\n          state.snapshot = freshSnapshot();\n          log(\"  \\\"use cache\\\" helper: no entry yet, queried the DB and cached the result.\");\n        } else {\n          log(\"  \\\"use cache\\\" helper: reused its cached result (no DB query).\");\n        }\n        text = priceText(state.snapshot);\n      } else {\n        text = state.data === \"const\" ? \"n\u002Fa\" : \"$\" + state.dbPrice;\n      }\n      const stale = text !== \"n\u002Fa\" && text !== \"$\" + state.dbPrice;\n      $(\"handlerSub\").textContent = \"runs now, at request time\";\n      $(\"boxHandler\").classList.add(\"info\");\n      $(\"outcomeSub\").textContent = stale ? \"from the helper's cache: \" + text : \"fresh: \" + text;\n      $(\"boxOutcome\").classList.add(stale ? \"bad\" : \"info\");\n      showResponse(text, stale);\n      log(\"✓ Handler ran: \" + d.why);\n      setStatus(\"Ran at request time: \" + d.why, stale ? \"warn\" : \"\");\n      $(\"hint\").textContent = state.model === \"default\"\n        ? \"This is the same file as the Next.js 14 preset. The only thing that changed is the version's default.\"\n        : \"Change the DB price and send again: a request-time handler always sees it.\";\n      return;\n    }\n\n    \u002F\u002F static: served from the saved response\n    let regenerated = false;\n    if (!state.snapshot) {\n      regenerated = true;\n      state.snapshot = freshSnapshot();\n      state.runs++;\n      $(\"runCount\").textContent = state.runs;\n      log(\"  Cache was invalidated: this request regenerated the response (\" + priceText(state.snapshot) + \").\");\n    }\n    const text = priceText(state.snapshot);\n    const stale = !state.snapshot.constant && state.snapshot.price !== state.dbPrice;\n    $(\"handlerSub\").textContent = \"did not run: response was saved\";\n    $(\"boxHandler\").classList.add(\"good\");\n    $(\"outcomeSub\").textContent = (stale ? \"STALE: \" : \"saved: \") + text;\n    $(\"boxOutcome\").classList.add(stale ? \"bad\" : \"good\");\n    showResponse(text, stale);\n    log((regenerated ? \"↻ Regenerated and saved the response. \" : \"↩ Served the saved response. \") + cap(d.why));\n    if (stale) {\n      setStatus(`Stale: the database says $${state.dbPrice}, the response says ${text}. Nothing re-ran the handler.`, \"bad\");\n      $(\"hint\").textContent = state.model === \"cc\"\n        ? (d.tagged ? \"Press Invalidate to model revalidateTag('products', 'max') from the webhook that wrote the price.\" : \"This model only invalidates tagged \\\"use cache\\\" entries. For live data, await connection() before the query.\")\n        : \"Press Invalidate to model revalidatePath('\u002Fapi\u002Fproducts') from the handler that wrote the price.\";\n    } else {\n      setStatus((regenerated ? \"Regenerated the response and saved it again. \" : \"Served a saved response. \") + cap(d.why), \"good\");\n      $(\"hint\").textContent = state.data === \"const\"\n        ? \"A constant response is safe to prerender; nothing can go stale.\"\n        : \"Now press \\\"Change DB price\\\" and send again.\";\n    }\n  }\n\n  function configChanged(reason) {\n    state.built = false;\n    state.snapshot = null;\n    clearBoxes();\n    $(\"buildSub\").textContent = \"config changed: rebuilds on next send\";\n    $(\"handlerSub\").textContent = \"waiting\";\n    $(\"outcomeSub\").textContent = \"waiting\";\n    showResponse(\"—\", false);\n    $(\"ccControls\").hidden = state.model !== \"cc\";\n    $(\"addrText\").textContent = state.method + \" \u002Fapi\u002Fproducts\";\n    describeCode();\n    if (reason) log(\"⚙ \" + reason);\n  }\n\n  $(\"modelSeg\").addEventListener(\"click\", (e) => {\n    const b = e.target.closest(\"button[data-model]\"); if (!b) return;\n    state.model = b.dataset.model; pressed(\"modelSeg\", \"model\", state.model);\n    configChanged(\"Switched to \" + b.textContent + \".\");\n  });\n  $(\"methodSeg\").addEventListener(\"click\", (e) => {\n    const b = e.target.closest(\"button[data-method]\"); if (!b) return;\n    state.method = b.dataset.method; pressed(\"methodSeg\", \"method\", state.method);\n    configChanged(\"Method: \" + state.method + \".\");\n  });\n  $(\"segSeg\").addEventListener(\"click\", (e) => {\n    const b = e.target.closest(\"button[data-seg]\"); if (!b) return;\n    state.seg = b.dataset.seg; pressed(\"segSeg\", \"seg\", state.seg);\n    configChanged(\"Segment config: \" + b.textContent + \".\");\n  });\n  $(\"dataSeg\").addEventListener(\"click\", (e) => {\n    const b = e.target.closest(\"button[data-data]\"); if (!b) return;\n    state.data = b.dataset.data; pressed(\"dataSeg\", \"data\", state.data);\n    configChanged(\"Data source: \" + b.textContent + \".\");\n  });\n  $(\"readsReq\").addEventListener(\"change\", () => configChanged(\"Request read: \" + (readsReq() ? \"on\" : \"off\") + \".\"));\n  $(\"useCache\").addEventListener(\"change\", () => configChanged(\"\\\"use cache\\\" helper: \" + (useCache() ? \"on\" : \"off\") + \".\"));\n\n  $(\"send\").addEventListener(\"click\", send);\n\n  $(\"changePrice\").addEventListener(\"click\", () => {\n    state.dbPrice = state.dbPrice === 40 ? 35 : 40;\n    $(\"dbPrice\").textContent = \"$\" + state.dbPrice;\n    $(\"changePrice\").textContent = \"Change DB price to $\" + (state.dbPrice === 40 ? 35 : 40);\n    log(`✎ UPDATE products SET price = ${state.dbPrice}. (A write elsewhere; nothing invalidates automatically.)`);\n    setStatus(`The database now says $${state.dbPrice}. Send a request to see what the API answers.`, \"\");\n  });\n\n  $(\"invalidate\").addEventListener(\"click\", () => {\n    const d = decide();\n    if (d.kind === \"error\") { log(\"✗ Nothing to invalidate: the build failed.\"); return; }\n    if (d.kind === \"dynamic\" && !d.cachedHelper) {\n      log(\"ℹ Nothing cached to invalidate: this handler already runs on every request.\");\n      setStatus(\"Nothing cached to invalidate: this handler runs per request.\", \"\");\n      return;\n    }\n    if (state.model === \"cc\") {\n      if (!(useCache() && state.data !== \"const\")) {\n        log(\"ℹ This model only invalidates a tagged \\\"use cache\\\" entry under cacheComponents; there is none here.\");\n        setStatus(\"Nothing tagged to invalidate in this model.\", \"\");\n        return;\n      }\n      log(\"⟳ revalidateTag('products', 'max'): the tagged entry is marked stale (simulated: next request regenerates).\");\n    } else {\n      log(\"⟳ revalidatePath('\u002Fapi\u002Fproducts'): the saved response is invalidated (simulated: next request regenerates).\");\n    }\n    state.snapshot = null;\n    setStatus(\"Invalidated (simulated). Send a request.\", \"\");\n  });\n\n  function resetAll() {\n    state.dbPrice = 40; state.runs = 0;\n    $(\"dbPrice\").textContent = \"$40\";\n    $(\"changePrice\").textContent = \"Change DB price to $35\";\n    $(\"runCount\").textContent = \"0\";\n    $(\"log\").textContent = \"\";\n    configChanged();\n    $(\"buildSub\").textContent = \"not run yet\";\n    setStatus(\"Ready. Pick a preset, or configure the handler and send a request.\", \"\");\n    $(\"hint\").textContent = \"Try the \\\"14: the $40 bug\\\" preset: send, change the price, send again.\";\n  }\n  $(\"reset\").addEventListener(\"click\", resetAll);\n\n  const PRESETS = {\n    bug14:      { model: \"v14\",     method: \"GET\", seg: \"none\",          data: \"async\", req: false, cache: false },\n    plain16:    { model: \"default\", method: \"GET\", seg: \"none\",          data: \"async\", req: false, cache: false },\n    static16:   { model: \"default\", method: \"GET\", seg: \"force-static\",  data: \"async\", req: false, cache: false },\n    ccQuery:    { model: \"cc\",      method: \"GET\", seg: \"none\",          data: \"async\", req: false, cache: false },\n    ccCache:    { model: \"cc\",      method: \"GET\", seg: \"none\",          data: \"async\", req: false, cache: true },\n    ccSync:     { model: \"cc\",      method: \"GET\", seg: \"none\",          data: \"sync\",  req: false, cache: false },\n    ccLeftover: { model: \"cc\",      method: \"GET\", seg: \"force-dynamic\", data: \"async\", req: false, cache: false },\n  };\n\n  function applyPreset(name) {\n    const p = PRESETS[name];\n    resetAll();\n    state.model = p.model; state.method = p.method; state.seg = p.seg; state.data = p.data;\n    pressed(\"modelSeg\", \"model\", p.model); pressed(\"methodSeg\", \"method\", p.method);\n    pressed(\"segSeg\", \"seg\", p.seg); pressed(\"dataSeg\", \"data\", p.data);\n    $(\"readsReq\").checked = p.req; $(\"useCache\").checked = p.cache;\n    configChanged(\"Preset loaded.\");\n    send();\n  }\n  document.querySelectorAll(\"[data-preset]\").forEach((b) =>\n    b.addEventListener(\"click\", () => applyPreset(b.dataset.preset))\n  );\n\n  configChanged();",{"height":52,"autorun":17},520,{"slug":45,"title":54,"excerpt":55,"coverUrl":56,"vertical":57},"Next.js Route Handlers: GET Stopped Caching in 15 — How to Cache in 16","Next.js 15 made GET Route Handlers dynamic by default. What that changes for code written for 14, how to cache one on purpose in 16, plus a cheat sheet.","\u002Fmedia\u002Fcovers\u002Fnextjs-weekly-route-handlers-caching-streaming.png",{"slug":6},[59,63,67,71,75,79,83,87,91,95,99,103],{"slug":60,"name":61,"articles":62},"webdev","Webdev",114,{"slug":64,"name":65,"articles":66},"javascript","Javascript",96,{"slug":68,"name":69,"articles":70},"frontend","Frontend",75,{"slug":72,"name":73,"articles":74},"tutorial","Tutorial",41,{"slug":76,"name":77,"articles":78},"css","Css",36,{"slug":80,"name":81,"articles":82},"typescript","Typescript",17,{"slug":84,"name":85,"articles":86},"performance","Performance",14,{"slug":88,"name":89,"articles":90},"react","React",13,{"slug":92,"name":93,"articles":94},"browser","Browser",11,{"slug":96,"name":97,"articles":98},"node","Node",10,{"slug":100,"name":101,"articles":102},"html","Html",8,{"slug":104,"name":105,"articles":106},"accessibility","Accessibility",7]