fix: align cache controls with config
Remove unused head-check config, make TTL overrides explicit, and tighten revalidation to avoid stale cache behavior.
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
- `Upstream` (string, required, http/https URL)
|
||||
- `Proxy` (string, optional, URL)
|
||||
- `CacheTTL` (duration, optional, overrides global)
|
||||
- `EnableHeadCheck` (bool, optional, default true)
|
||||
- **Validation Rules**: `Name` 必须唯一;`Domain` + `Port` 组合不得冲突;URL 必须可解析。
|
||||
- **Relationships**: 属于 `Config`,在运行时用于初始化路由、缓存目录 `StoragePath/<Name>`。
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
### HubRoute
|
||||
- **Description**: Host/端口到上游仓库的映射,供 Fiber 路由和 Proxy handler 使用。
|
||||
- **Fields**: `Name` (string, unique), `Domain` (string, FQDN), `Port` (int, 1-65535), `Upstream` (URL), `Proxy` (URL, optional), `CacheTTL` (duration override), `EnableHeadCheck` (bool).
|
||||
- **Fields**: `Name` (string, unique), `Domain` (string, FQDN), `Port` (int, 1-65535), `Upstream` (URL), `Proxy` (URL, optional), `CacheTTL` (duration override).
|
||||
- **Validation**: Name 唯一;Domain 不含协议/路径;Upstream 必须 http/https。
|
||||
- **Relationships**: 由 config 加载到 `HubRegistry`;与 CacheEntry、ProxyRequest 通过 `Name` 关联。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user