CacheRuleProps
Properties for defining a CacheRule.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-esa-cacherule
Initializer
import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkesa"
&alicloudroscdkesa.CacheRuleProps {
SiteId: interface{},
AdditionalCacheablePorts: interface{},
BrowserCacheMode: interface{},
BrowserCacheTtl: interface{},
BypassCache: interface{},
CacheDeceptionArmor: interface{},
CacheReserveEligibility: interface{},
CheckPresenceCookie: interface{},
CheckPresenceHeader: interface{},
EdgeCacheMode: interface{},
EdgeCacheTtl: interface{},
EdgeStatusCodeCacheTtl: interface{},
IncludeCookie: interface{},
IncludeHeader: interface{},
QueryString: interface{},
QueryStringMode: interface{},
Rule: interface{},
RuleEnable: interface{},
RuleName: interface{},
Sequence: interface{},
ServeStale: interface{},
SiteVersion: interface{},
SortQueryStringForCache: interface{},
UserDeviceType: interface{},
UserGeo: interface{},
UserLanguage: interface{},
}
Properties
| Name | Type | Description |
|---|---|---|
SiteId | interface{} | Property siteId: The site ID, which can be obtained by calling the [ListSites] API. |
AdditionalCacheablePorts | interface{} | Property additionalCacheablePorts: Enable caching on specified ports. |
BrowserCacheMode | interface{} | Property browserCacheMode: Browser cache mode. |
BrowserCacheTtl | interface{} | Property browserCacheTtl: Browser cache expiration time in seconds. |
BypassCache | interface{} | Property bypassCache: Set the bypass cache mode. |
CacheDeceptionArmor | interface{} | Property cacheDeceptionArmor: Cache deception protection. |
CacheReserveEligibility | interface{} | Property cacheReserveEligibility: Cache retention eligibility. |
CheckPresenceCookie | interface{} | Property checkPresenceCookie: When generating the cache key, check if the cookie exists. |
CheckPresenceHeader | interface{} | Property checkPresenceHeader: When generating the cache key, check if the header exists. |
EdgeCacheMode | interface{} | Property edgeCacheMode: Edge cache mode. |
EdgeCacheTtl | interface{} | Property edgeCacheTtl: Edge cache expiration time in seconds. |
EdgeStatusCodeCacheTtl | interface{} | Property edgeStatusCodeCacheTtl: Status code cache expiration time in seconds. |
IncludeCookie | interface{} | Property includeCookie: When generating the cache key, add the specified cookie names and their values. |
IncludeHeader | interface{} | Property includeHeader: When generating the cache key, add the specified header names and their values. |
QueryString | interface{} | Property queryString: Query strings to be reserved or excluded. |
QueryStringMode | interface{} | Property queryStringMode: The processing mode for query strings when generating the cache key. |
Rule | interface{} | Property rule: Rule content, using conditional expressions to match user requests. |
RuleEnable | interface{} | Property ruleEnable: Rule switch. |
RuleName | interface{} | Property ruleName: Rule name. |
Sequence | interface{} | Property sequence: Order of rule execution. |
ServeStale | interface{} | Property serveStale: Serve stale cache. |
SiteVersion | interface{} | Property siteVersion: The version number of the site configuration. |
SortQueryStringForCache | interface{} | Property sortQueryStringForCache: Query string sorting, disabled by default. |
UserDeviceType | interface{} | Property userDeviceType: When generating the cache key, add the client device type. |
UserGeo | interface{} | Property userGeo: When generating the cache key, add the client's geographic location. |
UserLanguage | interface{} | Property userLanguage: When generating cache keys, include the client's language type. |
SiteIdRequired
SiteId interface{}
- Type: interface{}
Property siteId: The site ID, which can be obtained by calling the [ListSites] API.
AdditionalCacheablePortsOptional
AdditionalCacheablePorts interface{}
- Type: interface{}
Property additionalCacheablePorts: Enable caching on specified ports.
Value range: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
BrowserCacheModeOptional
BrowserCacheMode interface{}
- Type: interface{}
Property browserCacheMode: Browser cache mode.
Possible values:
no_cacheno_cache: Do not cache.follow_origin: Follow the origin server's cache policy.override_origin: Override the origin server's cache policy.
BrowserCacheTtlOptional
BrowserCacheTtl interface{}
- Type: interface{}
Property browserCacheTtl: Browser cache expiration time in seconds.
BypassCacheOptional
BypassCache interface{}
- Type: interface{}
Property bypassCache: Set the bypass cache mode.
Possible values:
cache_all: Cache all requests.bypass_all: Bypass cache for all requests.
CacheDeceptionArmorOptional
CacheDeceptionArmor interface{}
- Type: interface{}
Property cacheDeceptionArmor: Cache deception protection.
Used to defend against web cache deception attacks, only the cache content that passes the validation will be cached. Value range:
on: Enabled.off: Disabled.
CacheReserveEligibilityOptional
CacheReserveEligibility interface{}
- Type: interface{}
Property cacheReserveEligibility: Cache retention eligibility.
Used to control whether user requests bypass the cache retention node when returning to the origin. Possible values:
bypass_cache_reserve: Requests bypass cache retention.eligible_for_cache_reserve: Eligible for cache retention.
CheckPresenceCookieOptional
CheckPresenceCookie interface{}
- Type: interface{}
Property checkPresenceCookie: When generating the cache key, check if the cookie exists.
If it does, add the cookie name (case-insensitive) to the cache key. Multiple cookie names are supported, separated by spaces.
CheckPresenceHeaderOptional
CheckPresenceHeader interface{}
- Type: interface{}
Property checkPresenceHeader: When generating the cache key, check if the header exists.
If it does, add the header name (case-insensitive) to the cache key. Multiple header names are supported, separated by spaces.
EdgeCacheModeOptional
EdgeCacheMode interface{}
- Type: interface{}
Property edgeCacheMode: Edge cache mode.
Possible values:
follow_origin: Follow the origin server's cache policy (if it exists), otherwise use the default cache policy.no_cache: Do not cache.override_origin: Override the origin server's cache policy.follow_origin_bypass: Follow the origin server's cache policy (if it exists), otherwise do not cache.
EdgeCacheTtlOptional
EdgeCacheTtl interface{}
- Type: interface{}
Property edgeCacheTtl: Edge cache expiration time in seconds.
EdgeStatusCodeCacheTtlOptional
EdgeStatusCodeCacheTtl interface{}
- Type: interface{}
Property edgeStatusCodeCacheTtl: Status code cache expiration time in seconds.
Multiple values are separated by commas, for example: 4xx=999999,5xx=999998
IncludeCookieOptional
IncludeCookie interface{}
- Type: interface{}
Property includeCookie: When generating the cache key, add the specified cookie names and their values.
Multiple values are supported, separated by spaces.
IncludeHeaderOptional
IncludeHeader interface{}
- Type: interface{}
Property includeHeader: When generating the cache key, add the specified header names and their values.
Multiple values are supported, separated by spaces.
QueryStringOptional
QueryString interface{}
- Type: interface{}
Property queryString: Query strings to be reserved or excluded.
Multiple values are supported, separated by spaces.
QueryStringModeOptional
QueryStringMode interface{}
- Type: interface{}
Property queryStringMode: The processing mode for query strings when generating the cache key.
Possible values:
ignore_all: Ignore all.exclude_query_string: Exclude specified query strings.reserve_all: Default, reserve all.include_query_string: Include specified query strings.
RuleOptional
Rule interface{}
- Type: interface{}
Property rule: Rule content, using conditional expressions to match user requests.
When adding global configuration, this parameter does not need to be set. There are two usage scenarios:
- Match all incoming requests: value set to true.
- Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com").
RuleEnableOptional
RuleEnable interface{}
- Type: interface{}
Property ruleEnable: Rule switch.
When adding global configuration, this parameter does not need to be set. Value range:
on: open.off: close.
RuleNameOptional
RuleName interface{}
- Type: interface{}
Property ruleName: Rule name.
When adding global configuration, this parameter does not need to be set.
SequenceOptional
Sequence interface{}
- Type: interface{}
Property sequence: Order of rule execution.
The smaller the value, the higher the priority for execution.
ServeStaleOptional
ServeStale interface{}
- Type: interface{}
Property serveStale: Serve stale cache.
When enabled, the node can still respond to user requests with expired cached files when the origin server is unavailable. Value range:
on: Enabled.off: Disabled.
SiteVersionOptional
SiteVersion interface{}
- Type: interface{}
Property siteVersion: The version number of the site configuration.
For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.
SortQueryStringForCacheOptional
SortQueryStringForCache interface{}
- Type: interface{}
Property sortQueryStringForCache: Query string sorting, disabled by default.
Possible values:
on: Enable.off: Disable.
UserDeviceTypeOptional
UserDeviceType interface{}
- Type: interface{}
Property userDeviceType: When generating the cache key, add the client device type.
Possible values:
on: Enable.off: Disable.
UserGeoOptional
UserGeo interface{}
- Type: interface{}
Property userGeo: When generating the cache key, add the client's geographic location.
Possible values:
on: Enable.off: Disable.
UserLanguageOptional
UserLanguage interface{}
- Type: interface{}
Property userLanguage: When generating cache keys, include the client's language type.
Possible values:
on: Enable.off: Disable.