Sha256: d8c81bbe6a586eb37016d1daeb973a652b96b1d472c4b54ddd005ea874421396

Contents?: true

Size: 418 Bytes

Versions: 2

Compression:

Stored size: 418 Bytes

Contents

module CableReady
  module Updatable
    class MemoryCacheDebounceAdapter
      include Singleton

      delegate_missing_to :@store

      def initialize
        super
        @store = ActiveSupport::Cache::MemoryStore.new(expires_in: 5.minutes, size: 8.megabytes)
      end

      def []=(key, value)
        @store.write(key, value)
      end

      def [](key)
        @store.read(key)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cable_ready-5.0.0.rc2 lib/cable_ready/updatable/memory_cache_debounce_adapter.rb
cable_ready-5.0.0.rc1 lib/cable_ready/updatable/memory_cache_debounce_adapter.rb