public class Cache extends AbstractModel
Constructor and Description |
---|
Cache() |
Cache(Cache 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 |
---|---|
CacheRule[] |
getCacheRules()
Get 缓存配置规则数组。
|
String |
getFollowOrigin()
Get 遵循源站 Cache-Control: max-age 配置,白名单功能。
on:开启
off:关闭
开启后,未能匹配 CacheRules 规则的资源将根据源站返回的 max-age 值进行节点缓存;匹配了 CacheRules 规则的资源将按照 CacheRules 中设置的缓存过期时间在节点进行缓存
注意:此字段可能返回 null,表示取不到有效值。
|
void |
setCacheRules(CacheRule[] CacheRules)
Set 缓存配置规则数组。
|
void |
setFollowOrigin(String FollowOrigin)
Set 遵循源站 Cache-Control: max-age 配置,白名单功能。
on:开启
off:关闭
开启后,未能匹配 CacheRules 规则的资源将根据源站返回的 max-age 值进行节点缓存;匹配了 CacheRules 规则的资源将按照 CacheRules 中设置的缓存过期时间在节点进行缓存
注意:此字段可能返回 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 Cache()
public Cache(Cache source)
public CacheRule[] getCacheRules()
public void setCacheRules(CacheRule[] CacheRules)
CacheRules
- 缓存配置规则数组。public String getFollowOrigin()
public void setFollowOrigin(String FollowOrigin)
FollowOrigin
- 遵循源站 Cache-Control: max-age 配置,白名单功能。
on:开启
off:关闭
开启后,未能匹配 CacheRules 规则的资源将根据源站返回的 max-age 值进行节点缓存;匹配了 CacheRules 规则的资源将按照 CacheRules 中设置的缓存过期时间在节点进行缓存
注意:此字段可能返回 null,表示取不到有效值。Copyright © 2022. All rights reserved.