<commit_before>const oneYearBySeconds = 31536000
const oneDayBySeconds = 86400

export const getCacheControl = (contentType) => {
  const prefix = 'max-age='
  switch (contentType) {
    case 'application/javascript':
    case 'text/css':
      return prefix + oneYearBySeconds
    case 'image/x-icon':
      return prefix + oneDayBySeconds
    case 'text/html':
    case 'application/json':
    default:
      return prefix + 0
  }
}
<commit_msg>Set cache-control for html and json<commit_after>const oneYearBySeconds = 31536000
const oneDayBySeconds = 86400
const tenSeconds = 10

export const getCacheControl = (contentType) => {
  const prefix = 'max-age='
  switch (contentType) {
    case 'application/javascript':
    case 'text/css':
      return prefix + oneYearBySeconds
    case 'image/x-icon':
      return prefix + oneDayBySeconds
    case 'text/html':
    case 'application/json':
    default:
      return prefix + tenSeconds
  }
}

{'fraction_non_alphanumeric': 0.09926082365364308, 'fraction_numerical': 0.030623020063357972, 'mean_word_length': 3.3686635944700463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4905431', 'n_tokens_mistral': 306, 'n_tokens_neox': 284, 'n_words': 78}