Method: Cloudfront::Helpers::CacheBehavior#build_xml
- Defined in:
- lib/cloudfront/helpers/cache_behavior.rb
#build_xml(xml) ⇒ Object
The cache behavior class container
<CacheBehavior>
<PathPattern>pattern that specifies files that this cache behavior applies to</PathPattern>
<TargetOriginId>ID of the origin that this cache behavior applies to</TargetOriginId>
<ForwardedValues>
<QueryString>true | false</QueryString>
<Cookies>
<Forward>all | whitelist | none</Forward>
<!-- Required when Forward = whitelist, omitted otherwise. -->
<WhitelistedNames>
<Quantity>number of names to forward to origin</Quantity>
<Items>
<Name>name of a cookie to forward to the origin</Name>
</Items>
</WhitelistedNames>
</Cookies>
</ForwardedValues>
<TrustedSigners>
... see TrustedSigners class
</TrustedSigners>
<ViewerProtocolPolicy>allow-all | https-only</ViewerProtocolPolicy>
<MinTTL>minimum TTL in seconds for files specified by PathPattern</MinTTL>
</CacheBehavior>
151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/cloudfront/helpers/cache_behavior.rb', line 151 def build_xml(xml) check_configuration if @is_default xml.DefaultCacheBehavior { cache_behavior_body(xml) } else xml.CacheBehavior { cache_behavior_body(xml) } end end |