<commit_before>class ApiDocServiceSweeper < ActionController::Caching::Sweeper
  observe ApiDocService

  def after_create(service)
    expire_cache_for(service)
  end
 
  def after_update(service)
    expire_cache_for(service)
  end
 
  def after_destroy(service)
    expire_cache_for(service)
  end
 
  private

  def expire_cache_for(service)
    # expire_action doesn't work with our custom routes, so instead use<commit_msg>Don't expire the cache on creation.<commit_after>class ApiDocServiceSweeper < ActionController::Caching::Sweeper
  observe ApiDocService

  def after_create(service)
  end
 
  def after_update(service)
    expire_cache_for(service)
  end
 
  def after_destroy(service)
    expire_cache_for(service)
  end
 
  private

  def expire_cache_for(service)
    # expire_action doesn't work with our custom routes, so instead use
{'fraction_non_alphanumeric': 0.058823529411764705, 'fraction_numerical': 0.0, 'mean_word_length': 4.75, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4809377', 'n_tokens_mistral': 282, 'n_tokens_neox': 263, 'n_words': 63}