All Products
Search
Document Center

Dynamic Content Delivery Network:RefreshErObjectCaches

Last Updated:May 07, 2024

Refreshes the cache that is written by calling the cache operation of EdgeRoutine. You can refresh multiple URLs in each request.

Operation description

  • DCDN supports POST requests in which parameters are sent as a form.
  • Related operation: such as RefreshDcdnObjectCaches .
  • By default, each Alibaba Cloud account can refresh content from a maximum of 10,000 URLs and 100 directories including subdirectories per day.
  • You can specify up to 1,000 URLs or 100 directories that you want to refresh in each request.
  • You can refresh a maximum of 1,000 URLs per minute for each domain name.
  • You can call this operation up to 30 times per second per account.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
dcdn:RefreshErObjectCachesWrite
  • Domain
    acs:dcdn:*:{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ObjectPathstringYes

The URL that you want to refresh.

Note
  • Separate URLs with line feeds (\n or \r\n). Each object path can be up to 1,024 characters in length.
  • The URLs in a request must belong to the same domain name.
  • You can refresh up to 1,000 URLs in each request.
  • http://example.com/examplefile.txt
    ObjectTypestringYes

    The refresh type. Valid values:

    • File (default): refreshes content based on URLs.
    • Directory: refreshes content based on directories.
    • Regex: refreshes content based on regular expressions.
    • IgnoreParams: removes the question mark (?) and parameters after the question mark (?) in a request URL and refreshes content. After you call this operation with the request URL submitted, the system compares the submitted URL with the URL of the cached resource without specific parameters. If the URLs match, the points of presence (POPs) refresh the cached resource.
    Note If you refresh the files in one or more directories, the resources in the directory that you want to refresh are marked as expired. You cannot delete the directory. If clients request resources on POPs that are marked as expired, Dynamic Content Delivery Network (DCDN) checks whether the resources on your origin server are updated. If resources are updated, DCDN retrieves the latest version of the resources and returns the resources to the clients. Otherwise, the origin server returns the 304 status code.
    File
    MergeDomainNamestringNo

    The domain names that are merged for refreshing. POPs that provide services for the domain names are refreshed.

    Note Separate multiple domain names with commas (,).
    a.test.com,b.test.com
    RoutineIdstringNo

    The ID of the routine, which is in the format of "Name.Subdomain" and is the unique identifier of a custom routine.

    test.mysubdomain
    ForcebooleanNo

    Specifies whether to refresh resources in a directory if the resources requested are different from the resources on the origin server. Default value: false.

    • true: refreshes all resources in the directory.
    • false: refreshes the changed resources in the directory.
    false

    Response parameters

    ParameterTypeDescriptionExample
    object

    Schema of Response

    RequestIdstring

    The request ID.

    3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F
    RefreshTaskIdstring

    The ID of the refresh task. Separate multiple IDs with commas (,).

    95248880

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "3C6CCEC4-6B88-4D4A-93E4-D47B3D92CF8F",
      "RefreshTaskId": "95248880"
    }

    Error codes

    HTTP status codeError codeError messageDescription
    400SingleRequest.OverLimitA maximum of 1000 URLs are supported for each request.-
    400InvalidObjectType.MalformedThe specified ObjectType is invalid.The ObjectType parameter is set to an invalid value. Specify a valid value and try again.
    400InvalidObjectPath.MalformedThe specified ObjectPath is invalid.The ObjectPath parameter is set to an invalid value. Specify a valid value and try again.
    400InvalidObjectPath.Size.MalformedThe size of ObjectPath is bigger than 1000.-
    400QuotaExceeded.RefreshYou've exceeded the prescribed refresh limits.-
    400QuotaExceeded.RefreshYour 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.
    400InvalidExtensiveDomain.ValueNotSupportedThe specified ExtensiveDomain is not supported.Wildcard domain names are not supported.
    400QuotaPerMinuteExceeded.RefreshYou tried to refresh too frequently; please try again later.Refresh requests are submitted too frequently. Try again later.
    400TooMany.RefreshThe refresh queue is full; please try again later.The maximum number of refresh requests for a domain name has been reached. Try again later.
    400InvalidExtensiveDomain.ValueNotSupportedExtensive domain not supported.-
    400PreloadQueueFullPreload queue is full, please try again later!-
    400QuotaPerMinuteExceeded.RefreshYou've exceeded the prescribed refresh limits per minute.-
    400InvalidStations.MalformedThe specified Stations is invalid.-
    400InvalidParametersThe parameters you provided are invalid.-

    For a list of error codes, visit the Service error codes.