All Products
Search
Document Center

Edge Security Acceleration:RefreshErObjectCaches

Last Updated:Oct 17, 2024

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

Operation description

Note
  • Dynamic Content Delivery Network (DCDN) supports POST requests in which parameters are sent as a form.
  • Related operation: RefreshDcdnObjectCaches .
  • By default, each Alibaba Cloud account can purge content from a maxim> um 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 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.
  • Debugging

    You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

    Authorization information

    There is currently no authorization information disclosed in the API.

    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.

    Change history

    Change timeSummary of changesOperation
    No change history