mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 23:06:36 +08:00
04f029c705
路由缓存策略新增 static(内置扩展名,不含 HTML)与 all; 存量 url 规范为 all。OpenResty 渲染与代理路由 UI 同步。
23 lines
725 B
Markdown
23 lines
725 B
Markdown
# 边缘缓存默认 static 策略 — 实现计划
|
||
|
||
对应设计:[edge-cache-design.md](../design/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**
|
||
|
||
## 验证
|
||
|
||
```bash
|
||
go test ./pkg/render/openresty/ ./internal/apps/openflare/proxy_route/
|
||
make code-check # 或至少 go test + frontend tsc
|
||
```
|