<commit_before>module Booty
  class AssetResponse
    attr_reader :status, :file_path, :content_type

    def initialize(status = 200, file_path, content_type)
      @status = status
      @file_path = file_path
      @content_type = content_type
    end

    def run(view_engine)
      [@status, {"Content-Type" => @content_type}, [File.read(File.join(Dir.pwd, @file_path))]]
    end
  end
end<commit_msg>add cache headers for static assets<commit_after>module Booty
  class AssetResponse
    attr_reader :status, :file_path, :content_type

    def initialize(status = 200, file_path, content_type)
      @status = status
      @file_path = file_path
      @content_type = content_type
    end

    def run(view_engine)
      headers = {
        "Content-Type" => @content_type,
        "Cache-control" => "public, max-age=31536000",
        "Expires" => "Wed, 01 Jan 2014 22:00:00 GMT"
      }
      [@status, headers, [File.read(File.join(Dir.pwd, @file_path))]]
    end
  end
end
{'fraction_non_alphanumeric': 0.11393692777212615, 'fraction_numerical': 0.026449643947100712, 'mean_word_length': 3.151898734177215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3813067', 'n_tokens_mistral': 352, 'n_tokens_neox': 320, 'n_words': 76}