Refreshes specified objects on points of presence (POPs). The objects can be included in the content of files or URLs. You can refresh multiple URLs in each request.
Operation description
- Dynamic Content Delivery Network (DCDN) supports POST requests in which parameters are sent as a form.
- You can call the RefreshDcdnObjectCaches operation to purge content and call the PreloadDcdnObjectCaches operation to prefetch content.
- By default, each Alibaba Cloud account can purge content from a maximum of 10,000 URLs and 100 directories including subdirectories per day. If the daily peak bandwidth of your Alibaba Cloud account exceeds 200 Mbit/s, submit a ticket to request a quota increase. Alibaba Cloud determines whether to approve your application based on your workloads.
- You can specify up to 1,000 URLs or 100 directories that you want to purge in each request.
- You can specify up to 1,000 URLs that you want to purge per minute for each domain name.
- You can call this operation up to 30 times per second per account.
Precautions
- After a purge task is completed, your resources that are cached on points of presence (POPs) are removed. When a POP receives a request for your resources, the request is redirected to the origin server to retrieve the resources. Then, the resources are returned to the client and cached on POPs. If you frequently run purge tasks, more requests are redirected to the origin server for resources. This results in high bandwidth costs and more loads on the origin server.
- A purge task takes effect 5 to 6 minutes after being submitted. If the resource you want to purge has a TTL of less than 5 minutes, you wait for it to expire instead of manually running a purge task.
- To allow RAM users to perform this operation, you need to first grant them the required permissions. For more information, see Authorize a RAM user to prefetch and refresh resources.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ObjectPath | string | Yes | The path of the objects that you want to refresh. Separate multiple URLs with line feed characters (\n) or a pair of carriage return and line feed characters (\r\n). | example.com/example.txt |
ObjectType | string | No | The refresh type. Valid values:
Note
| File |
Force | boolean | No | Specifies whether to refresh resources in a directory if the resources are different from the resources in the same directory in the origin server. Default value: false.
| false |
Response parameters
Examples
Sample success responses
JSON
format
{
"RefreshTaskId": "95248880",
"RequestId": "E5BD4B50-7A02-493A-AE0B-97B9024B4135"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | SingleRequest.OverLimit | A maximum of 1000 URLs are supported for each request. | - |
400 | InvalidObjectType.Malformed | The specified ObjectType is invalid. | The ObjectType parameter is set to an invalid value. Specify a valid value and try again. |
400 | InvalidObjectPath.Malformed | The specified ObjectPath is invalid. | The ObjectPath parameter is set to an invalid value. Specify a valid value and try again. |
400 | QuotaExceeded.Refresh | Your refresh attempts have exceeded the daily limit. | The number of refresh tasks on the current day has reached the upper limit. You can call the refresh API operation to query the remaining number of refresh tasks that you want to run on the current day. |
400 | InvalidExtensiveDomain.ValueNotSupported | The specified ExtensiveDomain is not supported. | Wildcard domain names are not supported. |
400 | QuotaPerMinuteExceeded.Refresh | You tried to refresh too frequently; please try again later. | Refresh requests are submitted too frequently. Try again later. |
400 | TooMany.Refresh | The refresh queue is full; please try again later. | The maximum number of refresh requests for a domain name has been reached. Try again later. |
429 | TooManyRequests | Too many requests, please try again later | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-10-17 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-07-03 | The Error code has changed | View Change Details |