Sha256: 17d4cecbaa223c0367ffc5273fbf0f06072bb57c165ba228136e6243d5afc287

Contents?: true

Size: 386 Bytes

Versions: 22

Compression:

Stored size: 386 Bytes

Contents

module Isomorfeus
  class ThreadLocalComponentCache
    def initialize
      Thread.current[:local_cache] = {} unless Thread.current.key?(:local_cache)
    end

    def fetch(key)
      Thread.current[:local_cache][key]
    end

    def store(key, rendered_tree, styles, status)
      Thread.current[:local_cache][key] = [rendered_tree, styles, status]
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
isomorfeus-preact-23.9.0.rc12 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc11 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc10 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc9 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc8 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc7 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc6 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc5 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc4 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc3 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc2 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.9.0.rc1 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.8.0.rc3 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.8.0.rc2 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.8.0.rc1 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.7.0.rc5 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.7.0.rc4 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.7.0.rc3 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.7.0.rc2 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.7.0.rc1 lib/isomorfeus/preact/thread_local_component_cache.rb