Fix cached unblaze blocks after state flush - #207
Conversation
Persist unblaze replacement content in compiled components so cached components can restore their replacements after Octane clears static state. Add a regression test covering cached component rendering across state flushes.
Benchmark Result: Default
Median of 10 attempts, 5000 iterations x 10 rounds, 46.68s total To run a specific benchmark, comment |
|
Hi @matt-h Thanks for reporting! Would you mind explaining exactly when do you hit this? Sounds like an Octane issue? |
|
@ganyicz I'm not using octane, just normal fpm/nginx. It seems to happen most times when a page with a flux input is loaded right after a fresh deploy of the app. It only seems to be the first load and then it works fine.
The error doesn't actually seem to break the page at all when it is loaded, the error just gets reported to the logs. |
|
It seems to be related to the fresh When working through the problem with my agent it gives this explanation.
|
|
Thanks! |
Summary
Fixes cached
@unblazecomponents throwing an undefined array key after flush clears static state. I ran into this when rendering Flux inputs, which use@unblazefor validation state.Previously, compiled components retained the token while its replacement content existed only in memory:
The replacement content is now embedded in the compiled component and restored whenever it runs.
I'm not sure if this is the best way to go about fixing this, but it works for me.
Testing
Added a regression test that renders a cached
@unblazecomponent, flushes its state, and renders it again.