Closed loatheb closed 7 years ago
The reason is when our site use the cache, ruby running the hypernova_batch_before
and hypernova_batch_after
but doesn't run the render_react_component
among them. So that the token doesn't be replaced in hypernova_batch_after
and absolutely not send the request to the hypernova server.
At last, we remove the memory cache in our code, after that, it works well.
The problem is that the hypernova writes the result to response.body and the caches_action reads from response_body.
A hacky solution we found to this problem is rewriting response_body[0] in the page controller.
response_body[0] = response.body
we don't like it. :\ but it should work.
Another solution is writing your own cache mechanism in a higher level where you have the whole body.
Hi.
I've been struggling with a similar issue. In my case i'm trying to get the returned html to be rendering in pdf format. But it only displays correctly if i add the parameter to show_as_html to true. what's the big diference of render the result as html instead of pdf? shoudn't the render to string return the same?
I'm not sure, but sometime when I open a site use SSR with
hypernova-ruby
andhypernova-react
, the site shows a__hypernova_render_token[0]__
also, I notice the node hypernova server doesn't log things about the request? Is that means the request is timeout in
hypernova-ruby
?Thanks