Prefetches content from origin servers to L2 nodes of Alibaba Cloud Content Delivery Network (CDN). This reduces workloads on origin servers because users can directly hit cache upon their first visits.
- Alibaba Cloud CDN supports POST requests in which parameters are sent as a form.
- You can call the RefreshObjectCaches operation to refresh content and call the PushObjectCache operation to prefetch content.
- You can specify at most 100 URLs in each prefetch request. You can submit at most 500 URLs every day with each Alibaba Cloud account.
- For each Alibaba Cloud account, the prefetch queue can contain up to 100 prefetch requests. Content is prefetched based on the time when the prefetch requests are submitted. The request that is submitted the earliest has the highest priority to prefetch content. If the number of prefetch requests in the queue reaches 100, you cannot submit more prefetch requests until the number drops below 100.
- L2 CDN nodes are deployed between L1 CDN nodes and origin servers to reduce workloads on the origin servers.
- The maximum number of times that each user can call this operation per second is 50.
- For more information about how to automate refresh or prefetch tasks, see Prefetch and refresh task scripts.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | PushObjectCache |
The operation that you want to perform. Set the value to PushObjectCache. |
ObjectPath | String | Yes | abc.com/image/1.png\nabc.com/image/2.png |
The URLs from which content is prefetched. Format: accelerated domain name/files to be prefetched. The URLs to be refreshed. You can specify multiple URLs and separate them with line feed characters (\n or \r\n). |
Area | String | No | domestic |
The accelerated region where content is to be prefetched. Valid values:
If you do not set this parameter, content in the accelerated region of the domain name is prefetched. The rules are:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PushTaskId | String | 9524xxxx |
The ID of the refresh task. If multiple tasks are returned, the IDs are separated with commas (,). |
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
The ID of the request. |
Examples
Sample requests
http(s)://cdn.aliyuncs.com/? Action=PushObjectCache
&ObjectPath=abc.com/image/1.png\nabc.com/image/2.png
&<Common request parameters>
Sample success responses
XML
format
<PushObjectCacheResponse>
<PushTaskId>9524xxxx</PushTaskId>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</PushObjectCacheResponse>
JSON
format
{
"PushTaskId": "9524xxxx",
"RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
For a list of error codes, visit the API Error Center.