Mitja Čebokli


20 Experience
0 Lessons Completed
0 Questions Solved


Hey Chris. Very interesting episode and solution.
I am trying to implement something like this (because you gave me an idea), but would like to extend it much further.

I am going with Gon gem, which is basically the same you are doing, but with different approach.
What I would like to do actually is a wee bit harder than what is shown here, because a proper authorization is needed, not just role based.

I would like to do this with CanCanCan, but I don't relly know how to do it properly and maintainable.
Currently I have a user's ability permissions hash, but how to actually do it in JS - here i have problems.

Any ideas? Do you think this is too much and doesn't really weight out caching?
Caching is great to make a site much faster, but with the cost of simplicity. Everything is ballooning in complexity.

Any thoughts?

Posted in Russian Doll Caching with Rails 5 Discussion

Hey Chris. Do you have any tips on expiring childrens when parent changes, where simple touching doesn't apply. Imagine a table of students and their related classes. You cache row fragments. When name of the class changes, rarely, but can, you have to expire all student fragments of the changed class.

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.