<commit_before>module EmailGroupsHelper
  def cache_key_for_email_groups(email_groups)
    # count = email_groups.size
    # max_updated_at = email_groups.maximum(:updated_at).try(:utc).try(:to_s, :number)
    count_max = email_groups.pluck("COUNT(*)", "MAX(updated_at)")[0].map(&:to_i)
    "email_groups/index-#{count_max.join('-')}"
  end
end<commit_msg>didnt work, order_by causes pg error, back to original with a little cleaning<commit_after>module EmailGroupsHelper
  def cache_key_for_email_groups(email_groups)
    # count = email_groups.size
    # max_updated_at = email_groups.maximum(:updated_at).try(:utc).try(:to_s, :number)
    # count_max = email_groups.pluck("COUNT(*)", "MAX(updated_at)")[0].map(&:to_i)
    [email_groups.size, email_groups.maximum(:updated_at)].map(&:to_i)
    "email_groups/index-#{count_max.join('-')}"
  end
end
{'fraction_non_alphanumeric': 0.15547703180212014, 'fraction_numerical': 0.002355712603062426, 'mean_word_length': 6.024793388429752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4719294', 'n_tokens_mistral': 311, 'n_tokens_neox': 308, 'n_words': 43}