Prefetches content from origin servers to L2 edge nodes. This reduces loads 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.
- By default, each Alibaba Cloud account can submit up to 1,000 URLs per day. If the daily peak bandwidth value of your workloads exceeds 200 Mbit/s, you can submit a ticket to request a quota increase. Alibaba Cloud reviews your application and then increase the quota accordingly.
- Each Alibaba Cloud account can submit up to 100 URLs at a time.
- For each Alibaba Cloud account, the prefetch queue can contain up to 50,000 URLs. Content is prefetched based on the time when the URLs are submitted. The URL that is submitted the earliest has the highest priority. If the number of URLs in the queue reaches 50,000, you cannot submit more URLs until the number drops below 50,000.
- The time that a prefetch task takes is based on the average size of the files to be prefetched. The smaller the average file size, the less time the prefetch task takes.
- 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 | example.com/image/1.png\example.org/image/2.png |
The URLs from which content is prefetched. Format: accelerated domain name/files to be prefetched. Note Separate multiple URLs with line feed characters (\n) or a pair of carriage return
and line feed characters (\r\n). Each object path can be up to 1,024 characters in
length.
|
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. Content is prefetched based on the following rules:
|
L2Preload | Boolean | No | true |
Specifies whether to prefetch content to L2 edge nodes. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PushTaskId | String | 9524xxxx |
The ID of the prefetch task. If multiple tasks are returned, the IDs are separated by commas (,). The task IDs are merged based on the following rules:
|
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 |
The ID of the request. |
Examples
Sample requests
http(s)://cdn.aliyuncs.com/?Action=PushObjectCache
&ObjectPath=example.com/image/1.png\example.org/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
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | SingleRequest.OverLimit | A maximum of 1000 URLs are supported for each request. | The error message returned because you can specify at most 1,000 URLs in each call. |
400 | QuotaExceeded.Preload | Your preload attempts have exceeded the daily limit. | The error message returned because the prefetch quota for the current day is exhausted. |
For a list of error codes, visit the API Error Center.