public class CacheConfigCache extends AbstractModel
Constructor and Description |
---|
CacheConfigCache() |
CacheConfigCache(CacheConfigCache 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 |
---|---|
Long |
getCacheTime()
Get 缓存过期时间设置
单位为秒,最大可设置为 365 天
注意:此字段可能返回 null,表示取不到有效值。
|
String |
getCompareMaxAge()
Get 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存
on:开启
off:关闭
默认为关闭状态
注意:此字段可能返回 null,表示取不到有效值。
|
String |
getIgnoreCacheControl()
Get 强制缓存
on:开启
off:关闭
默认为关闭状态,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存
注意:此字段可能返回 null,表示取不到有效值。
|
String |
getIgnoreSetCookie()
Get 当源站返回Set-Cookie头部时,节点是否缓存该头部及body
on:开启,不缓存该头部及body
off:关闭,遵循用户自定义的节点缓存规则
默认为关闭状态
注意:此字段可能返回 null,表示取不到有效值。
|
String |
getSwitch()
Get 缓存配置开关
on:开启
off:关闭
注意:此字段可能返回 null,表示取不到有效值。
|
void |
setCacheTime(Long CacheTime)
Set 缓存过期时间设置
单位为秒,最大可设置为 365 天
注意:此字段可能返回 null,表示取不到有效值。
|
void |
setCompareMaxAge(String CompareMaxAge)
Set 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存
on:开启
off:关闭
默认为关闭状态
注意:此字段可能返回 null,表示取不到有效值。
|
void |
setIgnoreCacheControl(String IgnoreCacheControl)
Set 强制缓存
on:开启
off:关闭
默认为关闭状态,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存
注意:此字段可能返回 null,表示取不到有效值。
|
void |
setIgnoreSetCookie(String IgnoreSetCookie)
Set 当源站返回Set-Cookie头部时,节点是否缓存该头部及body
on:开启,不缓存该头部及body
off:关闭,遵循用户自定义的节点缓存规则
默认为关闭状态
注意:此字段可能返回 null,表示取不到有效值。
|
void |
setSwitch(String Switch)
Set 缓存配置开关
on:开启
off:关闭
注意:此字段可能返回 null,表示取不到有效值。
|
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 CacheConfigCache()
public CacheConfigCache(CacheConfigCache source)
public String getSwitch()
public void setSwitch(String Switch)
Switch
- 缓存配置开关
on:开启
off:关闭
注意:此字段可能返回 null,表示取不到有效值。public Long getCacheTime()
public void setCacheTime(Long CacheTime)
CacheTime
- 缓存过期时间设置
单位为秒,最大可设置为 365 天
注意:此字段可能返回 null,表示取不到有效值。public String getCompareMaxAge()
public void setCompareMaxAge(String CompareMaxAge)
CompareMaxAge
- 高级缓存过期配置,开启时会对比源站返回的 max-age 值与 CacheRules 中设置的缓存过期时间,取最小值在节点进行缓存
on:开启
off:关闭
默认为关闭状态
注意:此字段可能返回 null,表示取不到有效值。public String getIgnoreCacheControl()
public void setIgnoreCacheControl(String IgnoreCacheControl)
IgnoreCacheControl
- 强制缓存
on:开启
off:关闭
默认为关闭状态,开启后,源站返回的 no-store、no-cache 资源,也将按照 CacheRules 规则进行缓存
注意:此字段可能返回 null,表示取不到有效值。public String getIgnoreSetCookie()
public void setIgnoreSetCookie(String IgnoreSetCookie)
IgnoreSetCookie
- 当源站返回Set-Cookie头部时,节点是否缓存该头部及body
on:开启,不缓存该头部及body
off:关闭,遵循用户自定义的节点缓存规则
默认为关闭状态
注意:此字段可能返回 null,表示取不到有效值。Copyright © 2022. All rights reserved.