Updated on 2023-12-13 GMT+08:00

CDN.CacheRule

Property Description

Table 1 Property description

Property

Required

Type

Description

priority

Yes

integer

Weight value of the configuration

Value Description: Supports the default value of 1. A larger value indicates a higher priority. The value ranges from 1 to 100.

content

No

string

Cache matching configuration

Value Description: When rule_type is 0, the value is null. When rule_type is 1, the value is the file suffix. If multiple suffixes exist, they need to be separated by semicolons (;). For example, .jps;.js. When rule_type is 2, the value is the directory. If multiple directories exist, they are separated by semicolons (;). For example, /www/html;/www/anc/.

ruleType

Yes

string

Cache type

Value Description: any: indicates that all types of files are matched. It is the default value. file: indicates that files are matched based on their suffixes.directory: indicates that files are matched based on directories.

ttlType

Yes

string

Cache time unit

Value Description: Supports a maximum of 365 days.

ttl

Yes

integer

Cache time

Value Description: Supports a maximum of 365 days.