> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/cn/cdn/purge/prefetchobjectcaches.md).

# PrefetchObjectCaches

## 1. 接口描述

调用本接口用于将源站的内容主动预热到缓存节点上。您首次访问可直接命中缓存，缓解源站压力。

## 2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

| 参数名称        | 必选 | 类型              | 描述       |
| ----------- | -- | --------------- | -------- |
| objectPaths | 是  | Array of String | 需要预热的文件。 |

## 3. 响应结果

| 参数名称      | 类型     | 描述                                         |
| --------- | ------ | ------------------------------------------ |
| requestId | String | 唯一请求 ID，每次请求都会返回。定位问题时需要提供该次请求的 requestId。 |
| taskId    | String | 预热任务Id                                     |

## 4. 代码示例

{% tabs %}
{% tab title="示例" %}

1. **预热**

```json
POST / HTTP/1.1
Host: console.zenlayer.com/api/v2/cdn
Content-Type: application/json
X-ZC-Action: PrefetchObjectCaches
<Common Request Params>

Request:
{
  "objectPaths": ["http://cdntest.zenlayer.com/dir/1.jpg", "http://cdntest.zenlayer.com/dir/2.jpg"]
}

Response:
{
  "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
  "response": {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "taskId": "taskId-xxxxxx"
  }
}
```

{% endtab %}
{% endtabs %}

## 5. 错误码

下面包含业务逻辑中遇到的错误码，其他错误码见[公共错误码](https://docs.console.zenlayer.com/api-reference/cn/api-introduction/instruction/commonerrorcode.md)
