All Products
Search
Document Center

Edge Security Acceleration:RefreshErObjectCaches

Last Updated:Sep 11, 2025

Call RefreshErObjectCaches to refresh caches that are written by the Edge Routine Cache API and caches of fetched subrequests. This operation supports batch URL refreshes.

Operation description

Note
  • This operation supports POST requests. Parameters are passed in a form.

  • Related refresh operations include RefreshDcdnObjectCaches.

  • By default, an account can submit up to 10,000 URL refreshes and 100 directory refreshes per day. A directory refresh also refreshes the content in its subdirectories.

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

  • You can submit up to 1,000 URL refreshes per minute for a single domain name.

  • The call frequency for a single user is limited to 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 URL to refresh.

Note
  • Separate multiple URLs with a line feed (\n) or a carriage return line feed (\r\n). The maximum length of a single URL is 1,024 characters.

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

  • A request can contain a maximum of 1,000 URLs.

http://example.com/examplefile.txt

ObjectType

string

Yes

The refresh type. Valid values:

  • File (default): URL.

  • Directory: directory.

  • Regex: regular expression-based refresh.

  • IgnoreParams: refresh that ignores parameters. When you use this type, the question mark (?) and any parameters that follow it are removed from the request URL. You submit a URL with its parameters removed. DCDN then removes parameters from the URLs of cached resources and compares them to your submitted URL. If a match is found, the cached resource is refreshed.

Note

By default, a directory refresh marks resources as expired instead of deleting them. The refresh sets the corresponding directory on edge nodes to expired. When a user later accesses the directory, DCDN nodes perform an origin fetch to check for updates. If the directory is updated, DCDN pulls the new version from the origin server and returns it to the user. If there are no updates, the origin server returns a 304 status code.

File

MergeDomainName

string

No

The domain names for a merged refresh. The refresh is applied to the combined scheduling nodes of the specified domain names.

Note

Separate multiple domain names with a comma (,).

a.test.com,b.test.com

RoutineId

string

No

The program ID of the Edge Routine script, also called the function ID. It is formed by combining "Name.Subdomain" and serves as the unique identifier for your Edge Routine code.

Note
  • Specify this parameter when you refresh caches written by the Cache API.

  • Do not specify this parameter when you refresh caches written by fetch subrequests.

test.mysubdomain

Force

boolean

No

Specifies the refresh mode for a directory. The default value is false.

  • true: Refresh all resources in the directory.

  • false: Refresh only the resources that have changed in the 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 returned 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.