loading...

re: Collection Caching in Rails with Local Variables VIEW POST

TOP OF THREAD FULL DISCUSSION
re: If you can isolate what it is about the user that causes the differences, you should use that as part of your cache key instead of current_user. e...
 

I think View Components is going to improve things a lot in this area by isolating the 'partial' from the global context to reduce this backdoor data access that breaks caching

 

I haven't used that library, but yeah, isolated context with all variables passed in as arguments would make it harder to screw up the caching.

Code of Conduct Report abuse