CacheRuleProps
Properties for defining a CacheRule.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-esa-cacherule
Initializer
import { CacheRuleProps } from '@alicloud/ros-cdk-esa'
const cacheRuleProps: CacheRuleProps = { ... }
Properties
| Name | Type | Description |
|---|---|---|
siteId | number | @alicloud/ros-cdk-core.IResolvable | Property siteId: The site ID, which can be obtained by calling the [ListSites] API. |
additionalCacheablePorts | number | @alicloud/ros-cdk-core.IResolvable | Property additionalCacheablePorts: Enable caching on specified ports. |
browserCacheMode | string | @alicloud/ros-cdk-core.IResolvable | Property browserCacheMode: Browser cache mode. |
browserCacheTtl | number | @alicloud/ros-cdk-core.IResolvable | Property browserCacheTtl: Browser cache expiration time in seconds. |
bypassCache | string | @alicloud/ros-cdk-core.IResolvable | Property bypassCache: Set the bypass cache mode. |
cacheDeceptionArmor | string | @alicloud/ros-cdk-core.IResolvable | Property cacheDeceptionArmor: Cache deception protection. |
cacheReserveEligibility | string | @alicloud/ros-cdk-core.IResolvable | Property cacheReserveEligibility: Cache retention eligibility. |
checkPresenceCookie | string | @alicloud/ros-cdk-core.IResolvable | Property checkPresenceCookie: When generating the cache key, check if the cookie exists. |
checkPresenceHeader | string | @alicloud/ros-cdk-core.IResolvable | Property checkPresenceHeader: When generating the cache key, check if the header exists. |
edgeCacheMode | string | @alicloud/ros-cdk-core.IResolvable | Property edgeCacheMode: Edge cache mode. |
edgeCacheTtl | number | @alicloud/ros-cdk-core.IResolvable | Property edgeCacheTtl: Edge cache expiration time in seconds. |
edgeStatusCodeCacheTtl | string | @alicloud/ros-cdk-core.IResolvable | Property edgeStatusCodeCacheTtl: Status code cache expiration time in seconds. |
includeCookie | string | @alicloud/ros-cdk-core.IResolvable | Property includeCookie: When generating the cache key, add the specified cookie names and their values. |
includeHeader | string | @alicloud/ros-cdk-core.IResolvable | Property includeHeader: When generating the cache key, add the specified header names and their values. |
queryString | string | @alicloud/ros-cdk-core.IResolvable | Property queryString: Query strings to be reserved or excluded. |
queryStringMode | string | @alicloud/ros-cdk-core.IResolvable | Property queryStringMode: The processing mode for query strings when generating the cache key. |
rule | string | @alicloud/ros-cdk-core.IResolvable | Property rule: Rule content, using conditional expressions to match user requests. |
ruleEnable | string | @alicloud/ros-cdk-core.IResolvable | Property ruleEnable: Rule switch. |
ruleName | string | @alicloud/ros-cdk-core.IResolvable | Property ruleName: Rule name. |
sequence | number | @alicloud/ros-cdk-core.IResolvable | Property sequence: Order of rule execution. |
serveStale | string | @alicloud/ros-cdk-core.IResolvable | Property serveStale: Serve stale cache. |
siteVersion | number | @alicloud/ros-cdk-core.IResolvable | Property siteVersion: The version number of the site configuration. |
sortQueryStringForCache | string | @alicloud/ros-cdk-core.IResolvable | Property sortQueryStringForCache: Query string sorting, disabled by default. |
userDeviceType | string | @alicloud/ros-cdk-core.IResolvable | Property userDeviceType: When generating the cache key, add the client device type. |
userGeo | string | @alicloud/ros-cdk-core.IResolvable | Property userGeo: When generating the cache key, add the client's geographic location. |
userLanguage | string | @alicloud/ros-cdk-core.IResolvable | Property userLanguage: When generating cache keys, include the client's language type. |
siteIdRequired
public readonly siteId: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property siteId: The site ID, which can be obtained by calling the [ListSites] API.
additionalCacheablePortsOptional
public readonly additionalCacheablePorts: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property additionalCacheablePorts: Enable caching on specified ports.
Value range: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
browserCacheModeOptional
public readonly browserCacheMode: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly browserCacheTtl: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property browserCacheTtl: Browser cache expiration time in seconds.
bypassCacheOptional
public readonly bypassCache: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property bypassCache: Set the bypass cache mode.
Possible values: - cache_all: Cache all requests. - bypass_all: Bypass cache for all requests.
cacheDeceptionArmorOptional
public readonly cacheDeceptionArmor: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly cacheReserveEligibility: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly checkPresenceCookie: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly checkPresenceHeader: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly edgeCacheMode: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly edgeCacheTtl: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property edgeCacheTtl: Edge cache expiration time in seconds.
edgeStatusCodeCacheTtlOptional
public readonly edgeStatusCodeCacheTtl: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property edgeStatusCodeCacheTtl: Status code cache expiration time in seconds.
Multiple values are separated by commas, for example: 4xx=999999,5xx=999998
includeCookieOptional
public readonly includeCookie: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property includeCookie: When generating the cache key, add the specified cookie names and their values.
Multiple values are supported, separated by spaces.
includeHeaderOptional
public readonly includeHeader: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property includeHeader: When generating the cache key, add the specified header names and their values.
Multiple values are supported, separated by spaces.
queryStringOptional
public readonly queryString: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property queryString: Query strings to be reserved or excluded.
Multiple values are supported, separated by spaces.
queryStringModeOptional
public readonly queryStringMode: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly rule: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly ruleEnable: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property ruleEnable: Rule switch.
When adding global configuration, this parameter does not need to be set. Value range: - on: open. - off: close.
ruleNameOptional
public readonly ruleName: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property ruleName: Rule name.
When adding global configuration, this parameter does not need to be set.
sequenceOptional
public readonly sequence: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
Property sequence: Order of rule execution.
The smaller the value, the higher the priority for execution.
serveStaleOptional
public readonly serveStale: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
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
public readonly siteVersion: number | IResolvable;
- Type: number | @alicloud/ros-cdk-core.IResolvable
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
public readonly sortQueryStringForCache: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property sortQueryStringForCache: Query string sorting, disabled by default.
Possible values: - on: Enable. - off: Disable.
userDeviceTypeOptional
public readonly userDeviceType: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property userDeviceType: When generating the cache key, add the client device type.
Possible values: - on: Enable. - off: Disable.
userGeoOptional
public readonly userGeo: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property userGeo: When generating the cache key, add the client's geographic location.
Possible values: - on: Enable. - off: Disable.
userLanguageOptional
public readonly userLanguage: string | IResolvable;
- Type: string | @alicloud/ros-cdk-core.IResolvable
Property userLanguage: When generating cache keys, include the client's language type.
Possible values: - on: Enable. - off: Disable.