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-2.1.16 lib/second_level_cache/config.rb
second_level_cache-2.1.15 lib/second_level_cache/config.rb
second_level_cache-2.1.14 lib/second_level_cache/config.rb
second_level_cache-2.1.13 lib/second_level_cache/config.rb
second_level_cache-2.1.10 lib/second_level_cache/config.rb
second_level_cache-2.1.9 lib/second_level_cache/config.rb
second_level_cache-2.1.8 lib/second_level_cache/config.rb
second_level_cache-2.1.7 lib/second_level_cache/config.rb
second_level_cache-2.1.6 lib/second_level_cache/config.rb
second_level_cache-2.1.5 lib/second_level_cache/config.rb
second_level_cache-2.1.2 lib/second_level_cache/config.rb
second_level_cache-2.1.1 lib/second_level_cache/config.rb
second_level_cache-2.1.0 lib/second_level_cache/config.rb
second_level_cache-2.1.0.rc2 lib/second_level_cache/config.rb
second_level_cache-2.1.0.rc1 lib/second_level_cache/config.rb
second_level_cache-2.0.0 lib/second_level_cache/config.rb
second_level_cache-2.0.0.rc1 lib/second_level_cache/config.rb
second_level_cache-2.0.0.beta lib/second_level_cache/config.rb
second_level_cache-1.6.2 lib/second_level_cache/config.rb
second_level_cache-1.6.1 lib/second_level_cache/config.rb