Sha256: 2ae276b9a7913c064b213e9f277967ed0065100d5e7c2988a77a3bb481578ab7

Contents?: true

Size: 398 Bytes

Versions: 9

Compression:

Stored size: 398 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, data, status)
      Thread.current[:local_cache][key] = [rendered_tree, styles, data, status]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
isomorfeus-preact-23.6.0.rc3 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.6.0.rc2 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.6.0.rc1 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.1.0.rc2 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-23.1.0.rc1 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-22.11.0.rc1 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-22.10.0.rc2 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-22.10.0.rc1 lib/isomorfeus/preact/thread_local_component_cache.rb
isomorfeus-preact-22.9.0.rc9 lib/isomorfeus/preact/thread_local_component_cache.rb