public class SimpleCache extends AbstractModel
Constructor and Description |
---|
SimpleCache() |
SimpleCache(SimpleCache 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 |
---|---|
SimpleCacheRule[] |
getCacheRules()
Get Cache expiration time rules
Note: This field may return `null`, indicating that no valid value can be obtained.
|
String |
getCompareMaxAge()
Get Advanced cache expiration configuration.
|
String |
getFollowOrigin()
Get Follows origin server Cache-Control: max-age configurations
`on`: Enable
`off`: Disable
If this is enabled, resources that do not match CacheRules rules will be cached by the node according to the max-age value returned by the origin server.
|
String |
getIgnoreCacheControl()
Get Forced cache
`on`: Enable
`off`: Disable
This is disabled by default.
|
String |
getIgnoreSetCookie()
Get Ignores the Set-Cookie header of the origin server
`on`: Enable
`off`: Disable
It is disabled by default.
|
Revalidate |
getRevalidate()
Get Always forwards to the origin server for verification
Note: This field may return `null`, indicating that no valid value can be obtained.
|
void |
setCacheRules(SimpleCacheRule[] CacheRules)
Set Cache expiration time rules
Note: This field may return `null`, indicating that no valid value can be obtained.
|
void |
setCompareMaxAge(String CompareMaxAge)
Set Advanced cache expiration configuration.
|
void |
setFollowOrigin(String FollowOrigin)
Set Follows origin server Cache-Control: max-age configurations
`on`: Enable
`off`: Disable
If this is enabled, resources that do not match CacheRules rules will be cached by the node according to the max-age value returned by the origin server.
|
void |
setIgnoreCacheControl(String IgnoreCacheControl)
Set Forced cache
`on`: Enable
`off`: Disable
This is disabled by default.
|
void |
setIgnoreSetCookie(String IgnoreSetCookie)
Set Ignores the Set-Cookie header of the origin server
`on`: Enable
`off`: Disable
It is disabled by default.
|
void |
setRevalidate(Revalidate Revalidate)
Set Always forwards to the origin server for verification
Note: This field may return `null`, indicating that no valid value can be obtained.
|
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 SimpleCache()
public SimpleCache(SimpleCache source)
public SimpleCacheRule[] getCacheRules()
public void setCacheRules(SimpleCacheRule[] CacheRules)
CacheRules
- Cache expiration time rules
Note: This field may return `null`, indicating that no valid value can be obtained.public String getFollowOrigin()
public void setFollowOrigin(String FollowOrigin)
FollowOrigin
- Follows origin server Cache-Control: max-age configurations
`on`: Enable
`off`: Disable
If this is enabled, resources that do not match CacheRules rules will be cached by the node according to the max-age value returned by the origin server. Resources that match CacheRules rules will be cached on the node according to the cache expiration time set in CacheRules.
This conflicts with CompareMaxAge. The two cannot be enabled at the same time.
Note: This field may return `null`, indicating that no valid value can be obtained.public String getIgnoreCacheControl()
public void setIgnoreCacheControl(String IgnoreCacheControl)
IgnoreCacheControl
- Forced cache
`on`: Enable
`off`: Disable
This is disabled by default. If enabled, the `no-store` and `no-cache` resources returned from the origin server will be cached according to `CacheRules` rules.
Note: This field may return `null`, indicating that no valid value can be obtained.public String getIgnoreSetCookie()
public void setIgnoreSetCookie(String IgnoreSetCookie)
IgnoreSetCookie
- Ignores the Set-Cookie header of the origin server
`on`: Enable
`off`: Disable
It is disabled by default.
Note: This field may return `null`, indicating that no valid value can be obtained.public String getCompareMaxAge()
public void setCompareMaxAge(String CompareMaxAge)
CompareMaxAge
- Advanced cache expiration configuration. If this is enabled, the max-age value returned by the origin server will be compared with the cache expiration time set in CacheRules, and the smallest value will be cached on the node.
`on`: Enable
`off`: Disable
It is disabled by default.
Note: This field may return `null`, indicating that no valid value can be obtained.public Revalidate getRevalidate()
public void setRevalidate(Revalidate Revalidate)
Revalidate
- Always forwards to the origin server for verification
Note: This field may return `null`, indicating that no valid value can be obtained.Copyright © 2023. All rights reserved.