Method: Cloudfront::Helpers::CacheBehavior#initialize

Defined in:
lib/cloudfront/helpers/cache_behavior.rb

#initialize(&block) ⇒ CacheBehavior

Returns a new instance of CacheBehavior.



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/cloudfront/helpers/cache_behavior.rb', line 21

def initialize(&block)
  #set default values
  @is_default = false
  @query_string_forward = true
  @cookies_forward_policy = "all"
  @trusted_signers = TrustedSigners.new
  @viewer_protocol_policy = "allow-all"
  @min_ttl = 86400 # one day as the default minimum ttl

  #set values from block
  instance_eval &block if block_given?
end