public class SimpleCacheRule extends AbstractModel
Constructor and Description |
---|
SimpleCacheRule() |
SimpleCacheRule(SimpleCacheRule 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 Content for each `CacheType`:
For `all`, enter a wildcard `*`.
|
Long |
getCacheTime()
Get Cache expiration time settings
Unit: second.
|
String |
getCacheType()
Get Rule types:
`all`: Apply to all files.
|
void |
setCacheContents(String[] CacheContents)
Set Content for each `CacheType`:
For `all`, enter a wildcard `*`.
|
void |
setCacheTime(Long CacheTime)
Set Cache expiration time settings
Unit: second.
|
void |
setCacheType(String CacheType)
Set Rule types:
`all`: Apply to 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 SimpleCacheRule()
public SimpleCacheRule(SimpleCacheRule source)
public String getCacheType()
public void setCacheType(String CacheType)
CacheType
- Rule types:
`all`: Apply to all files.
`file`: Apply to files with the specified suffixes.
`directory`: Apply to specified paths.
`path`: Apply to specified absolute paths.
index: home pagepublic String[] getCacheContents()
public void setCacheContents(String[] CacheContents)
CacheContents
- Content for each `CacheType`:
For `all`, enter a wildcard `*`.
For `file`, enter a suffix, e.g., `jpg` or `txt`.
For `directory`, enter a path, e.g., `/xxx/test/`.
For `path`, enter an absolute path, e.g., `/xxx/test.html`.
For `index`, enter a forward slash `/`.public Long getCacheTime()
public void setCacheTime(Long CacheTime)
CacheTime
- Cache expiration time settings
Unit: second. The maximum value is 365 days.Copyright © 2023. All rights reserved.