Part of #234 · PRD: docs/prd/2026-07-26-public-read-latency-and-cache-strategy.md (D3) · depends on #238, #239
EN
Prove on production that the cache does what it claims. This slice exists because the previous attempt at this problem (#207, shipped in #233) produced a better number while the underlying work still happened on every request — a per-process memo took /projects from 3.2–3.7 s to 1.4–1.6 s and was mistaken for progress toward sub-second until it was measured properly.
A faster number is not evidence. Two things must be shown separately:
- The read was skipped, not merely faster. A warm request must demonstrably not reach Supabase.
- Freshness still holds. A write must appear well inside the ≤10-minute target.
Also worth settling here, because it is currently an assertion rather than a measurement: three independent agents stated that unstable_cache on Vercel is backed by a durable cross-invocation Data Cache rather than per-process memory. That is consistent with the Next docs ("persist the result across requests and deployments") but has not been verified on this deployment. If it turns out not to hold, #238's fallback keeps the page correct and the whole approach collapses back to #234's D4 decision.
Acceptance criteria
TH
ส่วนหนึ่งของ #234 · PRD: docs/prd/2026-07-26-public-read-latency-and-cache-strategy.md (D3) · ขึ้นกับ #238, #239
พิสูจน์บน production ว่าแคชทำสิ่งที่มันอ้าง slice นี้มีอยู่เพราะความพยายามครั้งก่อนกับปัญหานี้ (#207 ship ใน #233) ให้ ตัวเลขที่ดีขึ้น ขณะที่งานเบื้องหลังยังเกิดทุก request — memo ต่อ process ทำ /projects จาก 3.2–3.7 วิ เหลือ 1.4–1.6 วิ และถูกเข้าใจว่าเป็นความคืบหน้าไปสู่ sub-second จนกระทั่งวัดอย่างถูกต้อง
ตัวเลขที่เร็วขึ้นไม่ใช่หลักฐาน ต้องแสดงสองอย่างแยกกัน:
- การอ่านถูกข้าม ไม่ใช่แค่เร็วขึ้น request ที่ warm ต้องพิสูจน์ได้ว่าไม่ไปถึง Supabase
- ความสดใหม่ยังอยู่ การเขียนต้องปรากฏภายในเป้า ≤10 นาทีอย่างสบาย
อีกเรื่องที่ควรตัดสินที่นี่ เพราะตอนนี้เป็นการอ้างไม่ใช่การวัด: เอเจนต์อิสระสามตัวระบุว่า unstable_cache บน Vercel อยู่บน Data Cache ที่ durable ข้าม invocation ไม่ใช่ memory ต่อ process ซึ่งสอดคล้องกับ docs ของ Next ("persist the result across requests and deployments") แต่ ยังไม่ถูกยืนยัน บนดีพลอยนี้ ถ้าปรากฏว่าไม่จริง ตัว fallback ของ #238 จะทำให้หน้ายังถูกต้อง และแนวทางทั้งหมดจะยุบกลับไปที่การตัดสินใจ D4 ของ #234
เกณฑ์รับงาน
Part of #234 · PRD:
docs/prd/2026-07-26-public-read-latency-and-cache-strategy.md(D3) · depends on #238, #239EN
Prove on production that the cache does what it claims. This slice exists because the previous attempt at this problem (#207, shipped in #233) produced a better number while the underlying work still happened on every request — a per-process memo took
/projectsfrom 3.2–3.7 s to 1.4–1.6 s and was mistaken for progress toward sub-second until it was measured properly.A faster number is not evidence. Two things must be shown separately:
Also worth settling here, because it is currently an assertion rather than a measurement: three independent agents stated that
unstable_cacheon Vercel is backed by a durable cross-invocation Data Cache rather than per-process memory. That is consistent with the Next docs ("persist the result across requests and deployments") but has not been verified on this deployment. If it turns out not to hold, #238's fallback keeps the page correct and the whole approach collapses back to #234's D4 decision.Acceptance criteria
/projectsunder 1 s, measured on production with the number recorded herex-vercel-cacheis expected to stayMISS— the route is still dynamic. State that plainly so the result is not read as a failureTH
ส่วนหนึ่งของ #234 · PRD:
docs/prd/2026-07-26-public-read-latency-and-cache-strategy.md(D3) · ขึ้นกับ #238, #239พิสูจน์บน production ว่าแคชทำสิ่งที่มันอ้าง slice นี้มีอยู่เพราะความพยายามครั้งก่อนกับปัญหานี้ (#207 ship ใน #233) ให้ ตัวเลขที่ดีขึ้น ขณะที่งานเบื้องหลังยังเกิดทุก request — memo ต่อ process ทำ
/projectsจาก 3.2–3.7 วิ เหลือ 1.4–1.6 วิ และถูกเข้าใจว่าเป็นความคืบหน้าไปสู่ sub-second จนกระทั่งวัดอย่างถูกต้องตัวเลขที่เร็วขึ้นไม่ใช่หลักฐาน ต้องแสดงสองอย่างแยกกัน:
อีกเรื่องที่ควรตัดสินที่นี่ เพราะตอนนี้เป็นการอ้างไม่ใช่การวัด: เอเจนต์อิสระสามตัวระบุว่า
unstable_cacheบน Vercel อยู่บน Data Cache ที่ durable ข้าม invocation ไม่ใช่ memory ต่อ process ซึ่งสอดคล้องกับ docs ของ Next ("persist the result across requests and deployments") แต่ ยังไม่ถูกยืนยัน บนดีพลอยนี้ ถ้าปรากฏว่าไม่จริง ตัว fallback ของ #238 จะทำให้หน้ายังถูกต้อง และแนวทางทั้งหมดจะยุบกลับไปที่การตัดสินใจ D4 ของ #234เกณฑ์รับงาน
/projectsต่ำกว่า 1 วินาที วัดบน production และบันทึกเลขไว้ที่นี่x-vercel-cacheคาดว่าจะยังเป็นMISS— route ยังเป็น dynamic ระบุให้ชัดเพื่อไม่ให้อ่านผลว่าล้มเหลว