Open gbateman opened 6 years ago
I'm not familiar with how action caching works, but I'd assume it would need to run after all filters - and hypernova runs in an around_filter. If it's not doing that, then it's probably caching the wrong thing in a number of cases.
Yeah, it seems like action caching takes the result from before after_filters though - not what hypernova could do to get around that if anything
I don't think there's anything; it seems like a flaw/bug in action cache, tbh.
I was trying to implement action caching using actionpack-action_caching but because of how hypernova works with render tokens, the cached result is just the render token. Furthermore, it is clearly useless to call the after action after returning such a result, because there were no calls to render_react_component if the result was cached. It would be nice if there was a supported way to enable caching on hypernova rendered components.
Currently I am storing the results of @hypernova_batch.submit! in the rails cache and then manually replacing the batch tokens from the cached results in an after action, but this method is not easy to abstract, and feels unclean.