Refreshes file content on nodes and refreshes the content of specified URLs to cache nodes. Supports batch URL refresh.
Operation description
Request method: POST requests are supported. Parameters are displayed in a form.
Related operations: The refresh and prefetch operations include the RefreshDcdnObjectCaches refresh operation and the PreloadDcdnObjectCaches prefetch operation.
URL refresh quota (daily): By default, each account can submit up to 10,000 URL refresh requests and 100 directory refresh requests per day. Directory refresh includes subdirectories. If the daily peak bandwidth of your Alibaba Cloud account exceeds 200 Mbit/s, you can request a higher daily quota by Quota Management. Alibaba Cloud will evaluate and configure the quota based on your actual business requirements.
Each request supports up to 1,000 URL refresh requests or 100 directory refresh requests.
A maximum of 10,000 URL refresh requests can be submitted per minute for a single domain name.
Maximum invocation frequency per user: 30 times per second.
Considerations
After a refresh node is submitted and successfully executed, the cached resources on DCDN points of presence (POPs) are invalidated. When you send an access request again, the point of presence (POP) retrieves the required resources from the origin server via back-to-origin and caches them on the POP again. Submitting a large number of refresh nodes clears a large amount of cache, which causes spikes in back-to-origin bandwidth and requests and increases the load on the origin server.
A refresh node takes approximately 5 to 6 minutes to take effect after it is submitted. If the time-to-live (TTL) configured for a file or directory is less than 5 minutes, you do not need to perform a refresh operation. Wait for the file or directory cache to expire and update automatically.
To use a Resource Access Management (RAM) user to perform refresh or prefetch operations, obtain authorization first. For more information, see Grant RAM users the refresh and prefetch permissions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:RefreshDcdnObjectCaches |
none |
*domain
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ObjectPath |
string |
Yes |
|
example.com/example.txt |
| ObjectType |
string |
No |
The refresh type. Valid values:
Note
|
File |
| Force |
boolean |
No |
Specifies whether to refresh all resources within the corresponding scope when the back-to-origin content is consistent with the origin server resources. Default value: false.
Note
This parameter takes effect for all refresh types except file refresh. |
false |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RefreshTaskId |
string |
The task ID returned for the refresh. Multiple IDs are separated by commas (,). |
95248880 |
| RequestId |
string |
The request ID. |
E5BD4B50-7A02-493A-AE0B-97B9024B4135 |
Examples
Success response
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 |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.