<commit_before>module Butterfli::Caching
  def self.included(base)
    base.extend(ClassMethods)
  end
  
  module ClassMethods
    def cache=(p)
      @cache = p
    end
    def cache
      return @cache || (self.cache = ( Butterfli.configuration.cache && Butterfli.configuration.cache.instantiate))
    end
  end
end

# Inject module into the global namespace
Butterfli.class_eval { include Butterfli::Caching }<commit_msg>Changed: Default to memory cache if no cache is configured<commit_after>module Butterfli::Caching
  def self.included(base)
    base.extend(ClassMethods)
  end
  
  module ClassMethods
    def cache=(p)
      @cache = p
    end
    def cache
      return @cache || (self.cache = default_cache)
    end

    private
    def default_cache
      (Butterfli.configuration.cache && Butterfli.configuration.cache.instantiate) || Butterfli::Configuration::MemoryCache.new.instantiate
    end
  end
end

# Inject module into the global namespace
Butterfli.class_eval { include Butterfli::Caching }
{'fraction_non_alphanumeric': 0.08382642998027613, 'fraction_numerical': 0.0, 'mean_word_length': 3.5927601809954752, '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': '7357332', 'n_tokens_mistral': 310, 'n_tokens_neox': 303, 'n_words': 79}