Class: AWSCDK::Lightsail::CfnDistribution::CacheBehaviorProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lightsail::CfnDistribution::CacheBehaviorProperty
- Defined in:
- lightsail/cfn_distribution.rb
Overview
CacheBehavior is a property of the AWS::Lightsail::Distribution resource. It describes the default cache behavior of an Amazon Lightsail content delivery network (CDN) distribution.
Instance Attribute Summary collapse
-
#behavior ⇒ String?
readonly
The cache behavior of the distribution.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(behavior: nil) ⇒ CacheBehaviorProperty
constructor
A new instance of CacheBehaviorProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(behavior: nil) ⇒ CacheBehaviorProperty
Returns a new instance of CacheBehaviorProperty.
735 736 737 738 |
# File 'lightsail/cfn_distribution.rb', line 735 def initialize(behavior: nil) @behavior = behavior Jsii::Type.check_type(@behavior, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "behavior") unless @behavior.nil? end |
Instance Attribute Details
#behavior ⇒ String? (readonly)
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 serves 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.
749 750 751 |
# File 'lightsail/cfn_distribution.rb', line 749 def behavior @behavior end |
Class Method Details
.jsii_properties ⇒ Object
751 752 753 754 755 |
# File 'lightsail/cfn_distribution.rb', line 751 def self.jsii_properties { :behavior => "behavior", } end |
Instance Method Details
#to_jsii ⇒ Object
757 758 759 760 761 762 763 |
# File 'lightsail/cfn_distribution.rb', line 757 def to_jsii result = {} result.merge!({ "behavior" => @behavior, }) result.compact end |