Cloudflare Cache Rules:什麼該快取,什麼要保持動態
Cloudflare Cache Rules 是 zone 層的快取政策:用 request expression 決定哪些內容 eligible for cache、Edge TTL/Browser TTL 怎麼算、cache key 包哪些維度,以及遇到 stale、ETag、purge 時怎麼處理。它適合管理 CDN 快取規則;Worker Cache API 則適合程式化存取。
Cloudflare Cache Rules 是 zone 層的快取政策:用 request expression 決定哪些內容 eligible for cache、Edge TTL/Browser TTL 怎麼算、cache key 包哪些維度,以及遇到 stale、ETag、purge 時怎麼處理。它適合管理 CDN 快取規則;Worker Cache API 則適合程式化存取。
Cloudflare Queues 是 Workers 旁邊的 message queue:producer 把慢工作寫進 queue,consumer 用批次、ack/retry、delay 與 DLQ 處理失敗。它適合單步背景工作;流程需要記住多步驟狀態時,下一篇要看 Workflows。
新版 Deno Deploy 是以 Deno 2 執行 application revision 的 serverless 平台;應以 timeline、context、database 與 observability 理解,而不是沿用 Deploy Classic 印象。
Fly.io 把可快速啟停的 Machines 放到指定 region,再由 Fly Proxy 與私有 6PN 接線;真正困難仍是有狀態資料的跨區一致性。
Hono RPC 匯出 route 的 `typeof AppType`,讓 `hc` client 推導 input、response body 與 status code;它共享的是 TypeScript type,不是獨立 wire schema。
Netlify 以 atomic deploy 和 preview 為核心,Functions、Edge Functions、Blobs/Database 再加入動態能力;每種 runtime 與 state 都有不同一致性和限制。
Drizzle ORM 是一個 SQL-first 的 TypeScript ORM——query builder 長得像 SQL,agent 寫出來的查詢在 diff 裡讀得懂。零依賴、約 7.4 KB gzipped,原生支援 Cloudflare D1、Neon、Turso 等 edge database。版本至今仍是 0.45.2,但週下載量已達 1,690 萬,超過 Prisma 的 1,380 萬。