Sha256: b9401db0545b34bd5a8dba6e7f7b2fd59a1cfd76cf8bc27c56a560f296d90fc9

Contents?: true

Size: 437 Bytes

Versions: 6

Compression:

Stored size: 437 Bytes

Contents

module SecondLevelCache
  class Config
    class << self
      attr_writer :cache_store, :logger, :cache_key_prefix

      def cache_store
        @cache_store ||= Rails.cache if defined?(Rails)
        @cache_store
      end

      def logger
        @logger ||= Rails.logger if defined?(Rails)
        @logger ||= Logger.new(STDOUT)
      end

      def cache_key_prefix
        @cache_key_prefix ||= 'slc'
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
second_level_cache-2.3.3 lib/second_level_cache/config.rb
second_level_cache-2.3.2 lib/second_level_cache/config.rb
second_level_cache-2.3.1 lib/second_level_cache/config.rb
second_level_cache-2.3.0 lib/second_level_cache/config.rb
second_level_cache-2.3.0.beta lib/second_level_cache/config.rb
second_level_cache-2.2.6 lib/second_level_cache/config.rb