public class AdvanceCacheRule extends AbstractModel
header, skipSign| Constructor and Description | 
|---|
| AdvanceCacheRule() | 
| AdvanceCacheRule(AdvanceCacheRule 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[] | getCacheContents()Get 对应类型下的匹配内容:
all 时填充 *
file 时填充后缀名,如 jpg、txt
directory 时填充路径,如 /xxx/test/
path 时填充绝对路径,如 /xxx/test.html
default 时填充 "no max-age"
注意:此字段可能返回 null,表示取不到有效值。 | 
| Long | getCacheTime()Get 缓存过期时间
单位为秒,最大可设置为 365 天
注意:此字段可能返回 null,表示取不到有效值。 | 
| String | getCacheType()Get 规则类型:
all:所有文件生效
file:指定文件后缀生效
directory:指定路径生效
path:指定绝对路径生效
default:源站未返回 max-age 情况下的缓存规则
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setCacheContents(String[] CacheContents)Set 对应类型下的匹配内容:
all 时填充 *
file 时填充后缀名,如 jpg、txt
directory 时填充路径,如 /xxx/test/
path 时填充绝对路径,如 /xxx/test.html
default 时填充 "no max-age"
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setCacheTime(Long CacheTime)Set 缓存过期时间
单位为秒,最大可设置为 365 天
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | setCacheType(String CacheType)Set 规则类型:
all:所有文件生效
file:指定文件后缀生效
directory:指定路径生效
path:指定绝对路径生效
default:源站未返回 max-age 情况下的缓存规则
注意:此字段可能返回 null,表示取不到有效值。 | 
| void | toMap(HashMap<String,String> map,
     String prefix)Internal implementation, normal users should not use it. | 
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, isStream, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonStringpublic AdvanceCacheRule()
public AdvanceCacheRule(AdvanceCacheRule source)
public String getCacheType()
public void setCacheType(String CacheType)
CacheType - 规则类型:
all:所有文件生效
file:指定文件后缀生效
directory:指定路径生效
path:指定绝对路径生效
default:源站未返回 max-age 情况下的缓存规则
注意:此字段可能返回 null,表示取不到有效值。public String[] getCacheContents()
public void setCacheContents(String[] CacheContents)
CacheContents - 对应类型下的匹配内容:
all 时填充 *
file 时填充后缀名,如 jpg、txt
directory 时填充路径,如 /xxx/test/
path 时填充绝对路径,如 /xxx/test.html
default 时填充 "no max-age"
注意:此字段可能返回 null,表示取不到有效值。public Long getCacheTime()
public void setCacheTime(Long CacheTime)
CacheTime - 缓存过期时间
单位为秒,最大可设置为 365 天
注意:此字段可能返回 null,表示取不到有效值。Copyright © 2025. All rights reserved.