Limenius / ReactRenderer

Client and Server-side React rendering from PHP
MIT License
237 stars 37 forks source link

Dynamically setting cache key causes crash #21

Closed gempir closed 6 years ago

gempir commented 6 years ago

I'm setting my cache on the fly, because depending on the page I want to have a different cache since my JS files are split per page.

So I do $this->reactRenderer->setCache($this->cacheItemPool, $myDynamicKey);

$this-cacheItemPool is the Symfony cache adapter and the dynamic key consists of the page and another id like string. When using this V8JS just seems to crash, but I can't find any more detailed information besides some invalid OPcode messages in the syslog or short message in the php-fpm logs.

gempir commented 6 years ago

This was not an issue with cache. This was an issue with using babel-polyfill on the server. Hard to find, because I don't know where to check the logs for v8js, v8 or ReactRenderer, but I found the solution thanks to another issue on another repository.