Sha256: b41ac77e6026209617ff78b358404a2e96e763a4487f146e77ad89c3512947a4

Contents?: true

Size: 434 Bytes

Versions: 24

Compression:

Stored size: 434 Bytes

Contents

# -*- encoding : utf-8 -*-
module SecondLevelCache
  module Config
    extend self

    attr_accessor :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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
second_level_cache-1.6.0 lib/second_level_cache/config.rb
second_level_cache-1.5.1 lib/second_level_cache/config.rb
second_level_cache-1.5.0 lib/second_level_cache/config.rb
second_level_cache-1.3.2 lib/second_level_cache/config.rb