public class MaxAgeRule extends AbstractModel
Constructor and Description |
---|
MaxAgeRule() |
MaxAgeRule(MaxAgeRule source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
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, toJsonString
public MaxAgeRule()
public MaxAgeRule(MaxAgeRule source)
public 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 the suffix, e.g., `jpg` or `txt`.
For `directory`, enter the path, e.g., `/xxx/test/`.
For `path`, enter the 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 value can be obtained.Copyright © 2022. All rights reserved.