public static class CachingRuleSummary.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
CachingRuleSummary.Builder |
action(CachingRuleSummary.Action action)
The action to take when the criteria of a caching rule are met.
|
CachingRuleSummary |
build() |
CachingRuleSummary.Builder |
cachingDuration(String cachingDuration)
The duration to cache content for the caching rule, specified in ISO 8601 extended
format.
|
CachingRuleSummary.Builder |
clientCachingDuration(String clientCachingDuration)
The duration to cache content in the user’s browser, specified in ISO 8601 extended
format.
|
CachingRuleSummary.Builder |
copy(CachingRuleSummary model) |
CachingRuleSummary.Builder |
criteria(List<CachingRuleCriteria> criteria)
The array of the rule criteria with condition and value.
|
CachingRuleSummary.Builder |
isClientCachingEnabled(Boolean isClientCachingEnabled)
Enables or disables client caching.
|
CachingRuleSummary.Builder |
key(String key)
The unique key for the caching rule.
|
CachingRuleSummary.Builder |
name(String name)
The name of the caching rule.
|
public CachingRuleSummary.Builder key(String key)
The unique key for the caching rule.
key
- the value to setpublic CachingRuleSummary.Builder name(String name)
The name of the caching rule.
name
- the value to setpublic CachingRuleSummary.Builder action(CachingRuleSummary.Action action)
The action to take when the criteria of a caching rule are met. - CACHE: Caches requested content when the criteria of the rule are met.
- **BYPASS_CACHE:** Allows requests to bypass the cache and be directed to the origin when the criteria of the rule is met.
action
- the value to setpublic CachingRuleSummary.Builder cachingDuration(String cachingDuration)
The duration to cache content for the caching rule, specified in ISO 8601 extended
format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value
that can be set for any unit is 99
. Mixing of multiple units is not supported.
Only applies when the action
is set to CACHE
. Example: PT1H
cachingDuration
- the value to setpublic CachingRuleSummary.Builder isClientCachingEnabled(Boolean isClientCachingEnabled)
Enables or disables client caching. Browsers use the Cache-Control
header value
for caching content locally in the browser. This setting overrides the addition of a
Cache-Control
header in responses.
isClientCachingEnabled
- the value to setpublic CachingRuleSummary.Builder clientCachingDuration(String clientCachingDuration)
The duration to cache content in the user’s browser, specified in ISO 8601 extended
format. Supported units: seconds, minutes, hours, days, weeks, months. The maximum value
that can be set for any unit is 99
. Mixing of multiple units is not supported.
Only applies when the action
is set to CACHE
. Example: PT1H
clientCachingDuration
- the value to setpublic CachingRuleSummary.Builder criteria(List<CachingRuleCriteria> criteria)
The array of the rule criteria with condition and value. The caching rule would be applied for the requests that matched any of the listed conditions.
criteria
- the value to setpublic CachingRuleSummary build()
public CachingRuleSummary.Builder copy(CachingRuleSummary model)
Copyright © 2016–2024. All rights reserved.