<commit_before># To change this template, choose Tools | Templates
# and open the template in the editor.

#includes some helper methods for commonly used fragament expirations
module CommonSweepers

  def expire_all_fragments
    expire_tag_fragments
    expire_all_favourite_fragments
    expire_organism_gadget
  end

  def expire_tag_fragments
    expire_fragment("sidebar_tag_cloud")
  end  

  #expires ALL fragment caches related to favourites
  def expire_all_favourite_fragments
    expire_fragment(/\/favourites\/user\/.*/)
  end
  
  def expire_organism_gadget
    expire_fragment "organisms_gadget"
  end
    
end
<commit_msg>expire more cached fragments for header, footer and new object gadget<commit_after># To change this template, choose Tools | Templates
# and open the template in the editor.

#includes some helper methods for commonly used fragament expirations
module CommonSweepers

  def expire_all_fragments
    expire_tag_fragments
    expire_all_favourite_fragments
    expire_organism_gadget
    expire_header_and_footer
    expire_new_object_gadget
  end

  def expire_new_object_gadget
    expire_fragment "new_object_gadget"
  end

  def expire_header_and_footer
    expire_fragment "header"
    expire_fragment "header_main"
    expire_fragment "footer"
  end

  def expire_tag_fragments
    expire_fragment("sidebar_tag_cloud")
  end  

  #expires ALL fragment caches related to favourites
  def expire_all_favourite_fragments
    expire_fragment(/\/favourites\/user\/.*/)
  end
  
  def expire_organism_gadget
    expire_fragment "organisms_gadget"
  end
    
end

{'fraction_non_alphanumeric': 0.040675844806007506, 'fraction_numerical': 0.0, 'mean_word_length': 4.2772277227722775, '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': '794428', 'n_tokens_mistral': 532, 'n_tokens_neox': 511, 'n_words': 132}