<commit_before>class ApplicationController < ActionController::Base
  helper :all
  include ExceptionNotifiable  
  
  local_addresses.clear

  # HP's proxy, among others, gets this wrong
  ActionController::Base.ip_spoofing_check = false

  filter_parameter_logging :password, :password_confirmation
  helper_method :current_person_session, :current_person

  def self.expire_cache
    FileUtils.rm_rf(File.join(RAILS_ROOT, 'public', 'results'))
    FileUtils.rm_rf(File.join(RAILS_ROOT, 'public', 'bar'))
    FileUtils.rm_rf(File.join(RAILS_ROOT, 'public', 'schedule'))
    FileUtils.rm(File.join(RAILS_ROOT, 'public', 'results.html'), :force => true)
    FileUtils.rm(File.join(RAILS_ROOT, 'public', 'schedule.html'), :force =>true)
    FileUtils.rm(File.join(RAILS_ROOT, 'public', 'index.html'), :force => true)
    FileUtils.rm(File.join(RAILS_ROOT, 'public', 'home.html'), :force => true)
    FileUtils.rm(File.join(RAILS_ROOT, 'public', 'bar.html'), :force => true)
  end

  def expire_cache
    if perform_caching
      ApplicationController.expire_cache
    end
  end

  def render_page(path = nil)
    unless path<commit_msg>Update list of cached file that need to be deleted when cache is expired<commit_after>class ApplicationController < ActionController::Base
  helper :all
  include ExceptionNotifiable
  
  local_addresses.clear

  # HP"s proxy, among others, gets this wrong
  ActionController::Base.ip_spoofing_check = false

  filter_parameter_logging :password, :password_confirmation
  helper_method :current_person_session, :current_person

  def self.expire_cache
    begin
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "bar"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "cat4_womens_race_series"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "competitions"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "events"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "people"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "rider_rankings"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "results"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "schedule"))
      FileUtils.rm_rf(File.join(RAILS_ROOT, "public", "teams"))
      FileUtils.rm(File.join(RAILS_ROOT, "public", "bar.html"), :force => true)
      FileUtils.rm(File.join(RAILS_ROOT, "public", "cat4_womens_race_series.html"), :force => true)
      FileUtils.rm(File.join(RAILS_ROOT, "public", "home.html"), :force => true)
      FileUtils.rm(File.join(RAILS_ROOT, "public", "index.html"), :force => true)
      FileUtils.rm(File.join(RAILS_ROOT, "public", "results.html"), :force => true)
      FileUtils.rm(File.join(RAILS_ROOT, "public", "rider_rankings.html"), :force => true)
      FileUtils.rm(File.join(RAILS_ROOT, "public", "schedule.html"), :force =>true)
    rescue Exception => e
      logger.error(e)
    end
    
    true
  end

  def expire_cache
    if perform_caching
      ApplicationController.expire_cache
    end
  end

  def render_page(path = nil)
    unless path
{'fraction_non_alphanumeric': 0.13414634146341464, 'fraction_numerical': 0.0006591957811470006, 'mean_word_length': 4.662313432835821, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '4811203', 'n_tokens_mistral': 1051, 'n_tokens_neox': 1034, 'n_words': 191}