Sha256: ca49a3a196c45f7dcf03f47fe688a79c47de872801022b10b8b4d2ecdcda9029

Contents?: true

Size: 543 Bytes

Versions: 12

Compression:

Stored size: 543 Bytes

Contents

# frozen_string_literal: true

require 'singleton'

class DHS::Config
  include Singleton

  attr_accessor :request_cycle_cache_enabled, :request_cycle_cache, :trace, :auto_oauth

  def initialize
    self.request_cycle_cache_enabled ||= true
    self.trace ||= false
    if defined?(ActiveSupport::Cache::MemoryStore)
      self.request_cycle_cache ||= ActiveSupport::Cache::MemoryStore.new
    end
  end

  def reset
    self.request_cycle_cache_enabled = nil
    self.trace = nil
    self.request_cycle_cache = nil
    initialize
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
dhs-1.6.0 lib/dhs/config.rb
dhs-1.5.0 lib/dhs/config.rb
dhs-1.4.2 lib/dhs/config.rb
dhs-1.4.1 lib/dhs/config.rb
dhs-1.4.0 lib/dhs/config.rb
dhs-1.3.0 lib/dhs/config.rb
dhs-1.2.0 lib/dhs/config.rb
dhs-1.1.0 lib/dhs/config.rb
dhs-1.0.3 lib/dhs/config.rb
dhs-1.0.2 lib/dhs/config.rb
dhs-1.0.1 lib/dhs/config.rb
dhs-1.0.0 lib/dhs/config.rb