Sha256: ac0649d1673bd8e38e3cf107daf07108cc050782d7c388fd92424b97e4e58e04

Contents?: true

Size: 530 Bytes

Versions: 36

Compression:

Stored size: 530 Bytes

Contents

# frozen_string_literal: true

require 'singleton'

class LHS::Config
  include Singleton

  attr_accessor :request_cycle_cache_enabled, :request_cycle_cache, :trace

  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

36 entries across 36 versions & 1 rubygems

Version Path
lhs-20.1.1 lib/lhs/config.rb
lhs-20.0.0 lib/lhs/config.rb
lhs-19.10.0 lib/lhs/config.rb
lhs-19.9.0 lib/lhs/config.rb
lhs-19.8.2 lib/lhs/config.rb
lhs-19.8.1 lib/lhs/config.rb
lhs-19.8.0 lib/lhs/config.rb
lhs-19.7.0 lib/lhs/config.rb
lhs-19.6.0 lib/lhs/config.rb
lhs-19.5.0 lib/lhs/config.rb
lhs-19.5.0.pre.wherehref.1 lib/lhs/config.rb
lhs-19.4.1 lib/lhs/config.rb
lhs-19.4.0 lib/lhs/config.rb
lhs-19.3.1 lib/lhs/config.rb
lhs-19.3.0 lib/lhs/config.rb
lhs-19.2.0 lib/lhs/config.rb