# 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 '{
    ...
  }'
```

---
