Prefetches content from an origin server to L2 cache nodes. After the prefetch is completed, cache hits occur when users request the content for the first time. This reduces workloads on the origin server.

Before you call this operation, pay attention to the following notes:
  • You can use an account to submit prefetch requests for a maximum of 500 URLs each day.
  • You cannot prefetch content based on directories by calling the operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes PreloadDcdnObjectCaches

The operation that you want to perform. Set the value to PreloadDcdnObjectCaches.

ObjectPath String Yes example.com/image/1.png

The URLs of the objects to prefetch. If you need to specify multiple URLs, separate them with line breaks (\n or \r\n).

Area String No domestic

The region of cache nodes where you want to store the prefetched objects. If you do not specify this parameter, prefetched objects are stored in all the cache nodes that are deployed across the world.

  • domestic: mainland China
  • overseas: outside mainland China

Response parameters

Parameter Type Example Description
PreloadTaskId String 95248880

The ID of the prefech task. If multiple tasks are returned, the IDs are separated with commas (,).

RequestId String E5BD4B50-7A02-493A-AE0B-97B9024B4135

The ID of the request.

Examples

Sample requests

http://dcdn.aliyuncs.com?Action=PreloadDcdnObjectCaches
&ObjectPath=test.test.com/test.txt
&<Common request parameters>

Sample success responses

XML format

<PreloadDcdnObjectCachesResponse>
	  <PushTaskId>95248880</PushTaskId>
	  <RequestId>E5BD4B50-7A02-493A-AE0B-97B9024B4135</RequestId>
</PreloadDcdnObjectCachesResponse>

JSON format

{
  "PushTaskId": "95248880",
  "RequestId": "E5BD4B50-7A02-493A-AE0B-97B9024B4135"
}

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 the maximum number of URLs in one request has been reached. You can specify a maximum of 1,000 URLs in one refresh request.
400 QuotaExceeded.Preload Your refresh attempts have exceeded the daily limit. The error message returned because the maximum number of refresh and prefetch requests on the current day has been reached.
400 InvalidObjectPath.Malformed The specified ObjectPath is invalid. The error message returned because the specified value of the ObjectPath parameter is invalid. Specify a valid value.
400 InvalidExtensiveDomain.ValueNotSupported The specified ExtensiveDomain is not supported. The error message returned because wildcard domain names are not supported.
400 PreloadQueueFull The warming queue is full; please try again later. The error message returned because the maximum number of URLs of the objects that are being prefetched has been reached. Try again later.

For a list of error codes, visit the API Error Center.