Closed ehowe closed 4 years ago
Full disclosure, I don't know the internal workings of rabl well enough to write a test that this will fix. I know that it fixed the tests in my rails app that were bombing out as a result. I'm more than willing to add a test if I can get some insight on how I could write a test that will touch that part of the codebase.
We need a fix for this, rabl is entirely broken in rails 5 at the moment.
With this PR we are double locking and double caching: our code uses @@digest_monitor.synchronize
and the action_view implementation will be using @@digest_mutex.synchronize
. This probably works, but is unnecessary.
If we're calling super()
to use the behaviour that the ActionView::Digestor
provides we might as well just use their implementation in full without wrapping. That is the approach I've taken in #674
Hi, I'm facing caching issue. Pls suggest me how to use this code or branch so that I can implement caching for my project.
Just asking the question to the original poster and other users:
Does this commit: https://github.com/nesquena/rabl/commit/00d08f103def8218a9d8de81244a22026b982300 and the resulting, much-thinner Digestor make this issue go away?
ActionView::Digestor
does not have an initializer. The class methods available aredigest
,logger
, andtree
. Reading the documentation makes me think thatRabl::Digestor
should just callsuper
to get back to the necessary method.