public class MaxAgeRule extends AbstractModel
| Constructor and Description | 
|---|
| MaxAgeRule() | 
| Modifier and Type | Method and Description | 
|---|---|
| String | getFollowOrigin()Get Whether to follow the origin server. | 
| String[] | getMaxAgeContents()Get Content for each `MaxAgeType`:
For `all`, enter a wildcard `*`. | 
| Long | getMaxAgeTime()Get MaxAge time (in seconds)
Note: the value `0` means not to cache. | 
| String | getMaxAgeType()Get Rule types:
`all`: effective for all files. | 
| void | setFollowOrigin(String FollowOrigin)Set Whether to follow the origin server. | 
| void | setMaxAgeContents(String[] MaxAgeContents)Set Content for each `MaxAgeType`:
For `all`, enter a wildcard `*`. | 
| void | setMaxAgeTime(Long MaxAgeTime)Set MaxAge time (in seconds)
Note: the value `0` means not to cache. | 
| void | setMaxAgeType(String MaxAgeType)Set Rule types:
`all`: effective for all files. | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonStringpublic String getMaxAgeType()
public void setMaxAgeType(String MaxAgeType)
MaxAgeType - Rule types:
`all`: effective for all files.
`file`: effective for specified file suffixes.
`directory`: effective for specified paths.
`path`: effective for specified absolute paths.
`index`: effective for specified homepages.public String[] getMaxAgeContents()
public void setMaxAgeContents(String[] MaxAgeContents)
MaxAgeContents - Content for each `MaxAgeType`:
For `all`, enter a wildcard `*`.
For `file`, enter a suffix, e.g., `jpg` or `txt`.
For `directory`, enter a path, e.g., `/xxx/test/`.
For `path`, enter an absolute path, e.g., `/xxx/test.html`.
For `index`, enter a forward slash `/`.
Note: the rule `all` cannot be deleted. It follows origin by default and can be modified.public Long getMaxAgeTime()
public void setMaxAgeTime(Long MaxAgeTime)
MaxAgeTime - MaxAge time (in seconds)
Note: the value `0` means not to cache.public String getFollowOrigin()
public void setFollowOrigin(String FollowOrigin)
FollowOrigin - Whether to follow the origin server. Valid values: `on` and `off`. If it's on, `MaxAgeTime` is ignored.
Note: this field may return `null`, indicating that no valid values can be obtained.Copyright © 2021. All rights reserved.