<commit_before># Put this in config/application.rb
require File.expand_path('../boot', __FILE__)
CONFIG = {}
require File.expand_path('../default_config', __FILE__)
require File.expand_path('../local_config', __FILE__)

require 'rails/all'

Bundler.require(:default, Rails.env) if defined?(Bundler)

module Moebooru
  class Application < Rails::Application
    config.encoding = 'utf-8'

    # Add additional load paths for your own custom dirs
    config.autoload_paths += [config.root.join('lib')]

    # Force all environments to use the same logger level
    # (by default production uses :info, the others :debug
    #config.log_level = :info

    if CONFIG['enable_caching']
      config.cache_store = :dalli_store, CONFIG['memcache_servers'], { :namespace => CONFIG['app_name'] }
    else
      config.cache_store = :file_store, Rails.root.join('tmp/cache')<commit_msg>Use cache's NullStore for non-production.<commit_after># Put this in config/application.rb
require File.expand_path('../boot', __FILE__)
CONFIG = {}
require File.expand_path('../default_config', __FILE__)
require File.expand_path('../local_config', __FILE__)

require 'rails/all'

Bundler.require(:default, Rails.env) if defined?(Bundler)

module Moebooru
  class Application < Rails::Application
    config.encoding = 'utf-8'

    # Add additional load paths for your own custom dirs
    config.autoload_paths += [config.root.join('lib')]

    # Force all environments to use the same logger level
    # (by default production uses :info, the others :debug
    #config.log_level = :info

    if Rails.env == 'production' and CONFIG['enable_caching']
      config.cache_store = :dalli_store, CONFIG['memcache_servers'], { :namespace => CONFIG['app_name'] }
    else
      config.cache_store = :null_store
{'fraction_non_alphanumeric': 0.12471910112359551, 'fraction_numerical': 0.0011235955056179776, 'mean_word_length': 4.364457831325301, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7181441', 'n_tokens_mistral': 545, 'n_tokens_neox': 531, 'n_words': 143}