Sha256: 6f81365715e695980f4149ea516335415c7c0addb50f00d40d875d4003328733

Contents?: true

Size: 543 Bytes

Versions: 26

Compression:

Stored size: 543 Bytes

Contents

# frozen_string_literal: true

require 'singleton'

class LHS::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

26 entries across 26 versions & 1 rubygems

Version Path
lhs-26.2.0 lib/lhs/config.rb
lhs-26.1.0 lib/lhs/config.rb
lhs-26.0.1 lib/lhs/config.rb
lhs-26.0.0 lib/lhs/config.rb
lhs-25.2.0 lib/lhs/config.rb
lhs-25.1.0 lib/lhs/config.rb
lhs-25.0.4 lib/lhs/config.rb
lhs-25.0.3 lib/lhs/config.rb
lhs-25.0.2 lib/lhs/config.rb
lhs-25.0.1 lib/lhs/config.rb
lhs-25.0.0 lib/lhs/config.rb
lhs-24.1.2 lib/lhs/config.rb
lhs-24.1.1 lib/lhs/config.rb
lhs-24.1.0 lib/lhs/config.rb
lhs-24.1.0.pre.2 lib/lhs/config.rb
lhs-24.1.0.pre.1 lib/lhs/config.rb
lhs-24.0.0 lib/lhs/config.rb
lhs-23.0.2 lib/lhs/config.rb
lhs-23.0.1 lib/lhs/config.rb
lhs-23.0.0 lib/lhs/config.rb