# File lib/uber-s3/operation/object/http_cache.rb, line 41 def infer_cache_control! return if ttl.nil? || content_type.nil? if ttl.is_a?(Hash) mime_types = ttl.keys match = mime_types.find {|pattern| !(content_type =~ /#{pattern}/i).nil? } self.cache_control = "public,max-age=#{ttl[match]}" if match else self.cache_control = "public,max-age=#{ttl}" end end