All Products
Search
Document Center

Edge Security Acceleration:RefreshErObjectCaches

Last Updated:Jun 18, 2026

Refreshes caches written through the edge function Cache API and caches written through fetch subrequests. Supports batch URL refresh.

Operation description

Note
  • Request method: POST requests are supported. Parameters are displayed in a form.

  • Related operations: Refresh operations include the RefreshDcdnObjectCaches 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.

  • Each request can contain up to 1,000 URL refresh requests or 100 directory refresh requests.

  • Each domain name supports up to 1,000 URL refresh requests per minute.

  • Maximum number of calls per user: 30 calls per second.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dcdn:RefreshErObjectCaches

none

*Domain

acs:dcdn:*:{#accountId}:domain/{#DomainName}

None None

Request parameters

Parameter

Type

Required

Description

Example

ObjectPath

string

Yes

The URLs to refresh.

Note
  • Separate multiple URLs with line breaks. Each URL can be up to 1,024 characters in length.

  • All URLs in a single request must belong to the same domain name.

  • Each request can contain up to 1,000 URLs.

http://example.com/examplefile.txt

ObjectType

string

Yes

The refresh type. Valid values:

  • File (default): URL.

  • Directory: directory refresh.

  • Regex: regular expression-based refresh.

  • IgnoreParams: purge by URL with parameters ignored. This refers to removing the ? and all parameters after ? from the request URL. When you submit a URL with parameters removed through this operation, the submitted URL is matched against cached resource URLs after their parameters are removed. If a cached resource URL matches the submitted URL after parameter removal, the point of presence (POP) executes the refresh on the cached resource.

Note

Directory refresh marks resources as expired by default. You cannot delete a directory. Directory refresh marks the corresponding directory on POPs as expired. When a user subsequently accesses the directory, the DCDN POP performs back-to-origin validation with the origin server to check whether the directory has been updated. If updated, the POP retrieves the new version from the origin server and returns it to the user. If not updated, the origin server returns a 304 status code in the response.

File

MergeDomainName

string

No

The domain names to merge for refresh. When a refresh is performed, the scheduling node of the merged domain names is refreshed.

Note

Separate multiple domain names with commas (,).

a.test.com,b.test.com

RoutineId

string

No

The routine ID of the edge function script, also known as the function ID. It is composed of "Name.Subdomain" and serves as the unique identifier for the edge function code.

Note
  • Specify this parameter when refreshing caches written through the Cache API.

  • Do not specify this parameter when refreshing caches written through fetch subrequests.

test.mysubdomain

Force

boolean

No

Specifies whether to refresh all resources in the corresponding directory when the back-to-origin content is inconsistent with the origin server resources. Default value: false.

  • true: Refreshes all resources in the corresponding directory.

  • false: Refreshes only the changed resources in the corresponding directory.

false

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

RefreshTaskId

string

The ID of the refresh task. Multiple IDs are separated by commas (,).

95248880

Examples

Success response

JSON format

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

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 InvalidObjectPath.Size.Malformed The size of ObjectPath is bigger than 1000.
400 QuotaExceeded.Refresh You've exceeded the prescribed refresh limits.
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.
400 PreloadQueueFull Preload queue is full, please try again later!
400 InvalidStations.Malformed The specified Stations is invalid.
400 InvalidParameters The parameters you provided are invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.