Files
OpenFlare/docs/plan/20260718-edge-cache-static-default.md
T
ryan 04f029c705 feat(cache): 开启缓存默认仅缓存标准静态资源
路由缓存策略新增 static(内置扩展名,不含 HTML)与 all;
存量 url 规范为 all。OpenResty 渲染与代理路由 UI 同步。
2026-07-18 23:32:49 +08:00

725 B
Raw Blame History

边缘缓存默认 static 策略 — 实现计划

对应设计:edge-cache-design.md

目标

路由开启缓存后默认仅缓存标准静态扩展名(static);存量 url 映射为 all。

修改清单

  1. 渲染 pkg/render/openresty/render.go:static 内置扩展名;url/all 无路径限制
  2. 校验 internal/apps/openflare/proxy_route/helpers.go:策略枚举与规范化
  3. 前端 cache-section.tsx + helpers:默认 static,选项文案
  4. 测试 render + helpers
  5. changelog

验证

go test ./pkg/render/openresty/ ./internal/apps/openflare/proxy_route/
make code-check  # 或至少 go test + frontend tsc