<commit_before>redis_config_file = Rails.root.join('config', 'resque.yml')

resque_url = if File.exists?(redis_config_file)
               YAML.load_file(redis_config_file)[Rails.env]
             else
               "redis://localhost:6379"
             end

# Redis::Store does not handle Unix sockets well, so let's do it for them
redis_config_hash = Redis::Store::Factory.extract_host_options_from_uri(resque_url)
redis_uri = URI.parse(resque_url)
if redis_uri.scheme == 'unix'
  redis_config_hash[:path] = redis_uri.path
end

redis_config_hash[:namespace] = 'cache:gitlab'

Gitlab::Application.config.cache_store = :redis_store, redis_config_hash<commit_msg>Rename resque_url to redis_url_string<commit_after>redis_config_file = Rails.root.join('config', 'resque.yml')

redis_url_string = if File.exists?(redis_config_file)
                     YAML.load_file(redis_config_file)[Rails.env]
                   else
                     "redis://localhost:6379"
                   end

# Redis::Store does not handle Unix sockets well, so let's do it for them
redis_config_hash = Redis::Store::Factory.extract_host_options_from_uri(redis_url_string)
redis_uri = URI.parse(redis_url_string)
if redis_uri.scheme == 'unix'
  redis_config_hash[:path] = redis_uri.path
end

redis_config_hash[:namespace] = 'cache:gitlab'

Gitlab::Application.config.cache_store = :redis_store, redis_config_hash
{'fraction_non_alphanumeric': 0.10344827586206896, 'fraction_numerical': 0.005747126436781609, 'mean_word_length': 4.1213235294117645, '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': '6014769', 'n_tokens_mistral': 497, 'n_tokens_neox': 476, 'n_words': 78}