Files
pyGoEdge-UserPanel/reference/goedge 文档/HTTPCacheTaskKeyService.md
2025-11-18 03:36:49 +08:00

80 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HTTPCacheTaskKeyService
> 缓存任务Key管理
---
## countHTTPCacheTaskKeysWithDay
> 计算当天已经清理的Key数量
- 角色:`user`
- HTTP`POST https://backend.dooki.cloud/HTTPCacheTaskKeyService/countHTTPCacheTaskKeysWithDay`
- RPC`rpc countHTTPCacheTaskKeysWithDay(CountHTTPCacheTaskKeysWithDayRequest) returns (RPCCountResponse);`
**请求对象 (`CountHTTPCacheTaskKeysWithDayRequest`)**
```json
{
"keyType": "string // Key类型清理purge预热fetch",
"day": "string // 日期格式YYYYMMDD"
}
```
**响应对象 (`RPCCountResponse`)**
```json
{
"count": "int64 // 数量"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPCacheTaskKeyService/countHTTPCacheTaskKeysWithDay" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---
## validateHTTPCacheTaskKeys
> 校验缓存Key
- 角色:`admin`, `user`
- HTTP`POST https://backend.dooki.cloud/HTTPCacheTaskKeyService/validateHTTPCacheTaskKeys`
- RPC`rpc validateHTTPCacheTaskKeys(ValidateHTTPCacheTaskKeysRequest) returns (ValidateHTTPCacheTaskKeysResponse);`
**请求对象 (`ValidateHTTPCacheTaskKeysRequest`)**
```json
{
"keys": "[]string"
}
```
**响应对象 (`ValidateHTTPCacheTaskKeysResponse`)**
```json
{
"failKeys": "[]FailKey",
"key": "string",
"reasonCode": "string"
}
```
**调用示例**
```bash
curl -X POST "https://backend.dooki.cloud/HTTPCacheTaskKeyService/validateHTTPCacheTaskKeys" \
-H "Content-Type: application/json" \
-H "X-Edge-Access-Token: <YOUR_TOKEN>" \
-d '{
...
}'
```
---