Class CacheBehavior
- java.lang.Object
-
- software.amazon.awssdk.services.lightsail.model.CacheBehavior
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<CacheBehavior.Builder,CacheBehavior>
@Generated("software.amazon.awssdk:codegen") public final class CacheBehavior extends Object implements SdkPojo, Serializable, ToCopyableBuilder<CacheBehavior.Builder,CacheBehavior>
Describes the default cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCacheBehavior.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BehaviorEnumbehavior()The cache behavior of the distribution.StringbehaviorAsString()The cache behavior of the distribution.static CacheBehavior.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()List<SdkField<?>>sdkFields()static Class<? extends CacheBehavior.Builder>serializableBuilderClass()CacheBehavior.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
behavior
public final BehaviorEnum behavior()
The cache behavior of the distribution.
The following cache behaviors can be specified:
-
cache- This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content. -
dont-cache- This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution'sCacheBehaviorPerPathparameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
If the service returns an enum value that is not available in the current SDK version,
behaviorwill returnBehaviorEnum.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frombehaviorAsString().- Returns:
- The cache behavior of the distribution.
The following cache behaviors can be specified:
-
cache- This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content. -
dont-cache- This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution'sCacheBehaviorPerPathparameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
-
- See Also:
BehaviorEnum
-
-
behaviorAsString
public final String behaviorAsString()
The cache behavior of the distribution.
The following cache behaviors can be specified:
-
cache- This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content. -
dont-cache- This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution'sCacheBehaviorPerPathparameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
If the service returns an enum value that is not available in the current SDK version,
behaviorwill returnBehaviorEnum.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frombehaviorAsString().- Returns:
- The cache behavior of the distribution.
The following cache behaviors can be specified:
-
cache- This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content. -
dont-cache- This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution'sCacheBehaviorPerPathparameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
-
- See Also:
BehaviorEnum
-
-
toBuilder
public CacheBehavior.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CacheBehavior.Builder,CacheBehavior>
-
builder
public static CacheBehavior.Builder builder()
-
serializableBuilderClass
public static Class<? extends CacheBehavior.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-