All Products
Search
Document Center

CDN:RefreshObjectCacheByCacheTag

Last Updated:Nov 17, 2024

Refreshes the cache based on cache tags that you configured.

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

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
cdn:RefreshObjectCacheByCacheTagnone
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The accelerated domain name.

example.com
ForcebooleanNo

Specifies whether to purge all resources that you submit if the requested content is one of the resources that you submit to purge. Default value: false.

  • true: The nearest POP fetches all resources from the origin server, delivers them to the client, and updates the cache with the new version.
  • false: The nearest POP checks the Last-Modified parameter of the resource on the origin server. If the parameter value is the same as that of the cached resource, the POP serves the cached resource. If the parameter value is not the same as that of the cached resource, the POP fetches the latest version from the origin server, delivers it to the client, and updates the cache with the new version.
true

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

2E5AD83F-BD7B-462E-8319-2E30E305519A
RefreshTaskIdstring

The ID of the refresh task. If multiple tasks are returned, the task IDs are separated by commas (,). The task IDs are merged based on the following rules:

  • If the tasks are specified for the same accelerated domain name, submitted within the same second, and run to refresh content based on URLs instead of directories, the task IDs are merged into one task ID (RefreshTaskId).
  • If the number of tasks that are specified for the same accelerated domain name, submitted within the same second, and run to refresh content based on URLs instead of directories exceeds 2,000, every 2,000 task IDs are merged into one task ID (RefreshTaskId).
17772470184

Examples

Sample success responses

JSONformat

{
  "RequestId": "2E5AD83F-BD7B-462E-8319-2E30E305519A",
  "RefreshTaskId": "17772470184"
}

Error codes

HTTP status codeError codeError messageDescription
400SingleRequest.OverLimitA maximum of 1000 URLs are supported for each request.-
400InvalidObjectType.MalformedThe specified ObjectType is invalid.-
400InvalidObjectPath.MalformedThe specified ObjectPath is invalid.-
400InvalidObjectPath.Size.MalformedThe size of ObjectPath is bigger than 1000.The number of URLs to be prefetched cannot exceed 1,000.
400QuotaExceeded.RefreshYou've exceeded the prescribed refresh limits.
400QuotaExceeded.RefreshYour refresh attempts have exceeded the daily limit.Refresh quantity exceeds daily quota limit.
400InvalidExtensiveDomain.ValueNotSupportedThe specified ExtensiveDomain is not supported.-
400QuotaPerMinuteExceeded.RefreshYou tried to refresh too frequently; please try again later.-
400TooMany.RefreshThe refresh queue is full; please try again later.-
400InvalidExtensiveDomain.ValueNotSupportedExtensive domain not supported.This operation is not supported for wildcard domain names.
400PreloadQueueFullPreload queue is full, please try again later!Preload 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.