isomorfeus-react 16.13.9 → 16.13.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -10
  3. data/lib/isomorfeus/props/validator.rb +2 -2
  4. data/lib/isomorfeus/{react_config.rb → react/config.rb} +189 -189
  5. data/lib/isomorfeus/react/memcached_component_cache.rb +19 -0
  6. data/lib/isomorfeus/react/redis_component_cache.rb +19 -0
  7. data/lib/isomorfeus/{thread_local_component_cache.rb → react/thread_local_component_cache.rb} +15 -15
  8. data/lib/isomorfeus/react_view_helper.rb +231 -231
  9. data/lib/isomorfeus/top_level.rb +103 -103
  10. data/lib/isomorfeus/top_level_ssr.rb +42 -42
  11. data/lib/isomorfeus-react-material-ui.rb +4 -4
  12. data/lib/isomorfeus-react-native.rb +5 -0
  13. data/lib/isomorfeus-react-paper.rb +4 -0
  14. data/lib/isomorfeus-react.rb +120 -118
  15. data/lib/isomorfeus_react/lucid_app/api.rb +26 -26
  16. data/lib/isomorfeus_react/lucid_app/base.rb +7 -7
  17. data/lib/isomorfeus_react/lucid_app/mixin.rb +23 -22
  18. data/lib/isomorfeus_react/lucid_app/native_component_constructor.rb +48 -49
  19. data/lib/isomorfeus_react/lucid_app/native_lucid_component_constructor.rb +94 -95
  20. data/lib/isomorfeus_react/lucid_component/api.rb +75 -102
  21. data/lib/isomorfeus_react/lucid_component/app_store_proxy.rb +37 -37
  22. data/lib/isomorfeus_react/lucid_component/base.rb +7 -7
  23. data/lib/isomorfeus_react/lucid_component/class_store_proxy.rb +44 -44
  24. data/lib/isomorfeus_react/lucid_component/initializer.rb +14 -14
  25. data/lib/isomorfeus_react/lucid_component/instance_store_proxy.rb +44 -44
  26. data/lib/isomorfeus_react/lucid_component/mixin.rb +22 -21
  27. data/lib/isomorfeus_react/lucid_component/native_component_constructor.rb +35 -35
  28. data/lib/isomorfeus_react/lucid_component/native_lucid_component_constructor.rb +82 -108
  29. data/lib/isomorfeus_react/lucid_component/styles_api.rb +34 -0
  30. data/lib/isomorfeus_react/lucid_func/base.rb +7 -7
  31. data/lib/isomorfeus_react/lucid_func/initializer.rb +11 -11
  32. data/lib/isomorfeus_react/lucid_func/mixin.rb +18 -17
  33. data/lib/isomorfeus_react/lucid_func/native_component_constructor.rb +81 -81
  34. data/lib/isomorfeus_react/react/function_component/api.rb +105 -104
  35. data/lib/isomorfeus_react/react/function_component/base.rb +8 -8
  36. data/lib/isomorfeus_react/react/function_component/initializer.rb +10 -10
  37. data/lib/isomorfeus_react/react/function_component/mixin.rb +17 -17
  38. data/lib/isomorfeus_react/react/function_component/native_component_constructor.rb +48 -48
  39. data/lib/isomorfeus_react/react/memo_component/base.rb +8 -8
  40. data/lib/isomorfeus_react/react/memo_component/mixin.rb +17 -17
  41. data/lib/isomorfeus_react/react/memo_component/native_component_constructor.rb +49 -49
  42. data/lib/isomorfeus_react_material/lucid_material/app/base.rb +8 -8
  43. data/lib/isomorfeus_react_material/lucid_material/app/mixin.rb +20 -19
  44. data/lib/isomorfeus_react_material/lucid_material/app/native_component_constructor.rb +50 -51
  45. data/lib/isomorfeus_react_material/lucid_material/component/base.rb +9 -9
  46. data/lib/isomorfeus_react_material/lucid_material/component/mixin.rb +19 -18
  47. data/lib/isomorfeus_react_material/lucid_material/component/native_component_constructor.rb +36 -36
  48. data/lib/isomorfeus_react_material/lucid_material/func/base.rb +9 -9
  49. data/lib/isomorfeus_react_material/lucid_material/func/mixin.rb +15 -14
  50. data/lib/isomorfeus_react_material/lucid_material/func/native_component_constructor.rb +83 -83
  51. data/lib/isomorfeus_react_paper/lucid_paper/app/base.rb +9 -0
  52. data/lib/isomorfeus_react_paper/lucid_paper/app/mixin.rb +19 -0
  53. data/lib/isomorfeus_react_paper/lucid_paper/app/native_component_constructor.rb +32 -0
  54. data/lib/isomorfeus_react_paper/lucid_paper/component/base.rb +9 -0
  55. data/lib/isomorfeus_react_paper/lucid_paper/component/mixin.rb +18 -0
  56. data/lib/isomorfeus_react_paper/lucid_paper/component/native_component_constructor.rb +25 -0
  57. data/lib/isomorfeus_react_paper/lucid_paper/func/base.rb +9 -0
  58. data/lib/isomorfeus_react_paper/lucid_paper/func/mixin.rb +14 -0
  59. data/lib/isomorfeus_react_paper/lucid_paper/func/native_component_constructor.rb +71 -0
  60. data/lib/lucid_app/context.rb +7 -7
  61. data/lib/lucid_prop_declaration/mixin.rb +126 -126
  62. data/lib/react/children.rb +34 -34
  63. data/lib/react/component/api.rb +134 -133
  64. data/lib/react/component/base.rb +8 -8
  65. data/lib/react/component/callbacks.rb +115 -115
  66. data/lib/react/component/elements.rb +60 -60
  67. data/lib/react/component/features.rb +48 -48
  68. data/lib/react/component/history.rb +69 -65
  69. data/lib/react/component/initializer.rb +11 -11
  70. data/lib/react/component/location.rb +19 -15
  71. data/lib/react/component/match.rb +35 -31
  72. data/lib/react/component/mixin.rb +20 -20
  73. data/lib/react/component/native_component_constructor.rb +69 -95
  74. data/lib/react/component/props.rb +83 -83
  75. data/lib/react/component/resolution.rb +97 -97
  76. data/lib/react/component/state.rb +58 -54
  77. data/lib/react/component/styles.rb +66 -66
  78. data/lib/react/context_wrapper.rb +48 -44
  79. data/lib/react/native_constant_wrapper.rb +29 -29
  80. data/lib/react/ref.rb +16 -12
  81. data/lib/react/synthetic_event.rb +52 -52
  82. data/lib/react/version.rb +3 -3
  83. data/lib/react.rb +296 -262
  84. data/lib/react_dom.rb +41 -41
  85. data/lib/react_dom_server.rb +18 -18
  86. data/lib/react_native/component/elements.rb +203 -0
  87. data/lib/react_native/lucid_app/react_native_component_constructor.rb +51 -0
  88. data/lib/react_native/lucid_component/react_native_component_constructor.rb +37 -0
  89. data/lib/react_native/lucid_func/react_native_component_constructor.rb +82 -0
  90. data/lib/react_native/react.rb +120 -0
  91. metadata +76 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e035ee0fa52630bee7cabe9a6e42043807ab3214aff268c94ab3d11a18c1bf5
4
- data.tar.gz: 941bd2452ff4ca38292dd60e6a74cc89bb6b5e378152e2dfe3b9dcfcae10867c
3
+ metadata.gz: d8f9816e2fafdce848a3c954dee14a9afbb099af1a9d5969b60745890cb7d68f
4
+ data.tar.gz: 33711bec7c6eaaac3e03054059fc156cbe0965bb852ec613365ef0e9667d8201
5
5
  SHA512:
6
- metadata.gz: 254fb5ad51c52ff2521494614bedbe215dd2980daed1300c00f98032d34460d798487c8dd5ccfebd26a823d63064e232be46030f1f22d793b6a42ccd6404aa4f
7
- data.tar.gz: 1a4b829bba24df5e78ebbff63cf6e688b8083d5349b41f08bf05234bc4ae7c5f4fb8726e5f20d1b94463a33aa0e74f47125bc5e3e98e7c23736fb6ef5eade765
6
+ metadata.gz: '0378cf74b5a5ad0847b17d390858573fbefffab89d5b24a773236e7d1ff5c06d68b04619851f2404e7b15bd697864b6546119cfd269a36bbb819682e4c7a00a1'
7
+ data.tar.gz: 39d4e06a48451fe2cc647a97ca9680356531811bbb607b9490d1bef1de4ab0cc2c9a7b0ebdc6d8cbca7a81ece7aaaf11fe005cf79aeb55cbdc34aa3af488c8f0
data/README.md CHANGED
@@ -1,23 +1,17 @@
1
1
  # isomorfeus-react
2
2
 
3
+ Isomorfeus-react is obsolete, superseded by [isomorfeus-preact](https://github.com/isomorfeus/isomorfeus-preact)
4
+ leo.or
3
5
  Develop React components for Opal Ruby along with very easy to use and advanced React-Redux Components.
4
6
 
5
7
  ## Community and Support
6
- At the [Isomorfeus Framework Project](http://isomorfeus.com)
8
+ At the [Isomorfeus Framework Project](http://isomorfeus.com)
7
9
 
8
10
  ## Versioning and Compatibility
9
11
  isomorfeus-react version follows the React version which features and API it implements.
10
12
 
11
13
  ### React
12
- Isomorfeus-react 16.12.x implements features and the API of React 16.12 and should be used with React 16.12
13
-
14
- ### Preact
15
- isomorfeus-react works with preact version 10.1.x.
16
-
17
- ### Nerv
18
- isomorfeus-react works in general with nervjs 1.5.x. with some issues:
19
- - Server Side Rendering does currently not work at all.
20
- - Some specs with respect to callbacks (component_will_unmount) and styles fail.
14
+ Isomorfeus-react 17.0.x implements features and the API of React 17.0.x and should be used with React 17.0.x
21
15
 
22
16
  ## Documentation
23
17
 
@@ -139,7 +139,7 @@ module Isomorfeus
139
139
  Isomorfeus.raise_error(message: "#{@c}: #{@p} must be a String") unless @v.class == String
140
140
  case @o[:type]
141
141
  when :email
142
- Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a valid email address") unless @v.match? /\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/
142
+ Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a valid email address") unless @v.match?(/\A[^@\s]+@([^@\s]+\.)+[^@\s]+\z/)
143
143
  when :uri
144
144
  if RUBY_ENGINE == 'opal'
145
145
  %x{
@@ -150,7 +150,7 @@ module Isomorfeus
150
150
  }
151
151
  }
152
152
  else
153
- Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a valid uri") unless @v.match? /\A#{URI.regexp}\z/
153
+ Isomorfeus.raise_error(message: "#{@c}: #{@p} is not a valid uri") unless @v.match?(/\A#{URI.regexp}\z/)
154
154
  end
155
155
  end
156
156
  end
@@ -1,189 +1,189 @@
1
- module Isomorfeus
2
- if RUBY_ENGINE == 'opal'
3
- class << self
4
- attr_accessor :current_user_sid
5
- attr_accessor :initial_state_fetched
6
- attr_accessor :top_component
7
- attr_accessor :ssr_response_status
8
- attr_reader :initialized
9
- attr_reader :env
10
- attr_accessor :zeitwerk
11
-
12
- def init
13
- return if initialized
14
- @initialized = true
15
- Isomorfeus.init_store
16
- execute_init_classes
17
- end
18
-
19
- def force_init!
20
- unless Isomorfeus.initial_state_fetched
21
- Isomorfeus.initial_state_fetched = true
22
- Redux::Store.preloaded_state = Isomorfeus.store.get_state
23
- end
24
- Isomorfeus.force_init_store!
25
- execute_init_classes
26
- end
27
-
28
- def add_client_init_class_name(init_class_name)
29
- client_init_class_names << init_class_name
30
- end
31
-
32
- def add_client_init_after_store_class_name(init_class_name)
33
- client_init_after_store_class_names << init_class_name
34
- end
35
-
36
- def add_client_option(key, value = nil)
37
- self.class.attr_accessor(key)
38
- self.send("#{key}=", value)
39
- end
40
-
41
- # only used for SSR
42
- def cached_component_classes
43
- @cached_component_classes ||= {}
44
- end
45
-
46
- # only used for SSR
47
- def cached_component_class(class_name)
48
- return cached_component_classes[class_name] if cached_component_classes.key?(class_name)
49
- cached_component_classes[class_name] = "::#{class_name}".constantize
50
- end
51
-
52
- def execute_init_classes
53
- client_init_class_names.each do |constant|
54
- constant.constantize.send(:init)
55
- end
56
- end
57
-
58
- def execute_init_after_store_classes
59
- client_init_after_store_class_names.each do |constant|
60
- constant.constantize.send(:init)
61
- end
62
- end
63
-
64
- def env=(env_string)
65
- @env = env_string ? env_string : 'development'
66
- @development = (@env == 'development') ? true : false
67
- @production = (@env == 'production') ? true : false
68
- @test = (@env == 'test') ? true : false
69
- end
70
-
71
- def development?
72
- @development
73
- end
74
-
75
- def production?
76
- @production
77
- end
78
-
79
- def test?
80
- @test
81
- end
82
-
83
- def start_app!
84
- Isomorfeus.zeitwerk.setup
85
- Isomorfeus::TopLevel.mount!
86
- end
87
-
88
- def force_render
89
- begin
90
- if Isomorfeus.top_component
91
- ReactDOM.find_dom_node(Isomorfeus.top_component) if on_browser? || on_desktop? # if not mounted will raise
92
- if `typeof Opal.global.deepForceUpdate === 'undefined'`
93
- Isomorfeus.top_component.JS.forceUpdate()
94
- else
95
- `Opal.global.deepForceUpdate(#{Isomorfeus.top_component})`
96
- end
97
- end
98
- rescue Exception => e
99
- # TODO try mount first
100
- # if it fails
101
- `console.error("force_render failed'! Error: " + #{e.message} + "! Reloading page.")`
102
- `location.reload()` if on_browser?
103
- end
104
- nil
105
- end
106
- end
107
-
108
- self.add_client_option(:client_init_class_names, [])
109
- self.add_client_option(:client_init_after_store_class_names, [])
110
- else
111
- class << self
112
- attr_reader :component_cache_init_block
113
- attr_accessor :server_side_rendering
114
- attr_accessor :ssr_hot_asset_url
115
- attr_reader :env
116
- attr_accessor :zeitwerk
117
- attr_accessor :zeitwerk_lock
118
-
119
- def component_cache_init(&block)
120
- @component_cache_init_block = block
121
- end
122
-
123
- def configuration(&block)
124
- block.call(self)
125
- end
126
-
127
- def env=(env_string)
128
- @env = env_string ? env_string.to_s : 'development'
129
- @development = (@env == 'development') ? true : false
130
- @production = (@env == 'production') ? true : false
131
- @test = (@env == 'test') ? true : false
132
- end
133
-
134
- def development?
135
- @development
136
- end
137
-
138
- def production?
139
- @production
140
- end
141
-
142
- def test?
143
- @test
144
- end
145
-
146
- def ssr_contexts
147
- @ssr_contexts ||= {}
148
- end
149
-
150
- def version
151
- Isomorfeus::VERSION
152
- end
153
-
154
- def load_configuration(directory)
155
- Dir.glob(File.join(directory, '*.rb')).sort.each do |file|
156
- require File.expand_path(file)
157
- end
158
- end
159
- end
160
- end
161
-
162
- class << self
163
- def raise_error(error_class: nil, message: nil, stack: nil)
164
- error_class = RuntimeError unless error_class
165
- execution_environment = if on_browser? then 'on Browser'
166
- elsif on_ssr? then 'in Server Side Rendering'
167
- elsif on_server? then 'on Server'
168
- elsif on_mobile? then 'on Mobile'
169
- elsif on_database? then 'on Database'
170
- else
171
- 'on Client'
172
- end
173
- error = error_class.new("Isomorfeus in #{env} #{execution_environment}:\n#{message}")
174
- error.set_backtrace(stack) if stack
175
-
176
- if Isomorfeus.development?
177
- if RUBY_ENGINE == 'opal'
178
- ecn = error_class ? error_class.name : ''
179
- m = message ? message : ''
180
- s = stack ? stack : ''
181
- `console.error(ecn, m, s)`
182
- else
183
- STDERR.puts "#{ecn}: #{m}\n #{s}"
184
- end
185
- end
186
- raise error
187
- end
188
- end
189
- end
1
+ module Isomorfeus
2
+ if RUBY_ENGINE == 'opal'
3
+ class << self
4
+ attr_accessor :current_user_sid
5
+ attr_accessor :initial_state_fetched
6
+ attr_accessor :top_component
7
+ attr_accessor :ssr_response_status
8
+ attr_reader :initialized
9
+ attr_reader :env
10
+ attr_accessor :zeitwerk
11
+
12
+ def init
13
+ return if initialized
14
+ @initialized = true
15
+ Isomorfeus.init_store
16
+ execute_init_classes
17
+ end
18
+
19
+ def force_init!
20
+ unless Isomorfeus.initial_state_fetched
21
+ Isomorfeus.initial_state_fetched = true
22
+ Redux::Store.preloaded_state = Isomorfeus.store.get_state
23
+ end
24
+ Isomorfeus.force_init_store!
25
+ execute_init_classes
26
+ end
27
+
28
+ def add_client_init_class_name(init_class_name)
29
+ client_init_class_names << init_class_name
30
+ end
31
+
32
+ def add_client_init_after_store_class_name(init_class_name)
33
+ client_init_after_store_class_names << init_class_name
34
+ end
35
+
36
+ def add_client_option(key, value = nil)
37
+ self.class.attr_accessor(key)
38
+ self.send("#{key}=", value)
39
+ end
40
+
41
+ # only used for SSR
42
+ def cached_component_classes
43
+ @cached_component_classes ||= {}
44
+ end
45
+
46
+ # only used for SSR
47
+ def cached_component_class(class_name)
48
+ return cached_component_classes[class_name] if cached_component_classes.key?(class_name)
49
+ cached_component_classes[class_name] = "::#{class_name}".constantize
50
+ end
51
+
52
+ def execute_init_classes
53
+ client_init_class_names.each do |constant|
54
+ constant.constantize.send(:init)
55
+ end
56
+ end
57
+
58
+ def execute_init_after_store_classes
59
+ client_init_after_store_class_names.each do |constant|
60
+ constant.constantize.send(:init)
61
+ end
62
+ end
63
+
64
+ def env=(env_string)
65
+ @env = env_string ? env_string : 'development'
66
+ @development = (@env == 'development') ? true : false
67
+ @production = (@env == 'production') ? true : false
68
+ @test = (@env == 'test') ? true : false
69
+ end
70
+
71
+ def development?
72
+ @development
73
+ end
74
+
75
+ def production?
76
+ @production
77
+ end
78
+
79
+ def test?
80
+ @test
81
+ end
82
+
83
+ def start_app!
84
+ Isomorfeus.zeitwerk.setup
85
+ Isomorfeus::TopLevel.mount!
86
+ end
87
+
88
+ def force_render
89
+ begin
90
+ if Isomorfeus.top_component
91
+ ReactDOM.find_dom_node(Isomorfeus.top_component) if on_browser? || on_desktop? # if not mounted will raise
92
+ if `typeof Opal.global.deepForceUpdate === 'undefined'`
93
+ Isomorfeus.top_component.JS.forceUpdate()
94
+ else
95
+ `Opal.global.deepForceUpdate(#{Isomorfeus.top_component})`
96
+ end
97
+ end
98
+ rescue Exception => e
99
+ # TODO try mount first
100
+ # if it fails
101
+ `console.error("force_render failed'! Error: " + #{e.message} + "! Reloading page.")`
102
+ `location.reload()` if on_browser?
103
+ end
104
+ nil
105
+ end
106
+ end
107
+
108
+ self.add_client_option(:client_init_class_names, [])
109
+ self.add_client_option(:client_init_after_store_class_names, [])
110
+ else
111
+ class << self
112
+ attr_reader :component_cache_init_block
113
+ attr_accessor :server_side_rendering
114
+ attr_accessor :ssr_hot_asset_url
115
+ attr_reader :env
116
+ attr_accessor :zeitwerk
117
+ attr_accessor :zeitwerk_lock
118
+
119
+ def component_cache_init(&block)
120
+ @component_cache_init_block = block
121
+ end
122
+
123
+ def configuration(&block)
124
+ block.call(self)
125
+ end
126
+
127
+ def env=(env_string)
128
+ @env = env_string ? env_string.to_s : 'development'
129
+ @development = (@env == 'development') ? true : false
130
+ @production = (@env == 'production') ? true : false
131
+ @test = (@env == 'test') ? true : false
132
+ end
133
+
134
+ def development?
135
+ @development
136
+ end
137
+
138
+ def production?
139
+ @production
140
+ end
141
+
142
+ def test?
143
+ @test
144
+ end
145
+
146
+ def ssr_contexts
147
+ @ssr_contexts ||= {}
148
+ end
149
+
150
+ def version
151
+ Isomorfeus::VERSION
152
+ end
153
+
154
+ def load_configuration(directory)
155
+ Dir.glob(File.join(directory, '*.rb')).sort.each do |file|
156
+ require File.expand_path(file)
157
+ end
158
+ end
159
+ end
160
+ end
161
+
162
+ class << self
163
+ def raise_error(error_class: nil, message: nil, stack: nil)
164
+ error_class = RuntimeError unless error_class
165
+ execution_environment = if on_browser? then 'on Browser'
166
+ elsif on_ssr? then 'in Server Side Rendering'
167
+ elsif on_server? then 'on Server'
168
+ elsif on_mobile? then 'on Mobile'
169
+ elsif on_database? then 'on Database'
170
+ else
171
+ 'on Client'
172
+ end
173
+ error = error_class.new("Isomorfeus in #{env} #{execution_environment}:\n#{message}")
174
+ error.set_backtrace(stack) if stack
175
+
176
+ if Isomorfeus.development?
177
+ if RUBY_ENGINE == 'opal'
178
+ ecn = error_class ? error_class.name : ''
179
+ m = message ? message : ''
180
+ s = stack ? stack : ''
181
+ `console.error(ecn, m, s)`
182
+ else
183
+ STDERR.puts "#{ecn}: #{m}\n #{s}"
184
+ end
185
+ end
186
+ raise error
187
+ end
188
+ end
189
+ end
@@ -0,0 +1,19 @@
1
+ module Isomorfeus
2
+ module Professional
3
+ class MemcachedComponentCache
4
+ def initialize(*args)
5
+ @dalli_client = Dalli::Client.new(*args)
6
+ end
7
+
8
+ def fetch(key)
9
+ json = @dalli_client.get(key)
10
+ Oj.load(json, mode: :strict)
11
+ end
12
+
13
+ def store(key, rendered_tree, response_status, styles)
14
+ json = Oj.dump([rendered_tree, response_status, styles], mode: :strict)
15
+ @dalli_client.set(key, json)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Isomorfeus
2
+ module Professional
3
+ class RedisComponentCache
4
+ def initialize(*args)
5
+ @redis_client = Redis.new(@args)
6
+ end
7
+
8
+ def fetch(key)
9
+ json = @redis_client.get(key)
10
+ Oj.load(json, mode: :strict)
11
+ end
12
+
13
+ def store(key, rendered_tree, response_status, styles)
14
+ json = Oj.dump([rendered_tree, response_status, styles], mode: :strict)
15
+ @redis_client.set(key, json)
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,15 +1,15 @@
1
- module Isomorfeus
2
- class ThreadLocalComponentCache
3
- def initialize
4
- Thread.current[:local_cache] = {} unless Thread.current.key?(:local_cache)
5
- end
6
-
7
- def fetch(key)
8
- Thread.current[:local_cache][key]
9
- end
10
-
11
- def store(key, rendered_tree, response_status, styles)
12
- Thread.current[:local_cache][key] = [rendered_tree, response_status, styles]
13
- end
14
- end
15
- end
1
+ module Isomorfeus
2
+ class ThreadLocalComponentCache
3
+ def initialize
4
+ Thread.current[:local_cache] = {} unless Thread.current.key?(:local_cache)
5
+ end
6
+
7
+ def fetch(key)
8
+ Thread.current[:local_cache][key]
9
+ end
10
+
11
+ def store(key, rendered_tree, response_status, styles)
12
+ Thread.current[:local_cache][key] = [rendered_tree, response_status, styles]
13
+ end
14
+ end
15
+ end