Containers support#16
Conversation
|
How is this better than Rails 4's support for russian doll caching? |
|
Russian doll mainly handles changes to the view file. Let's say we have models section and article. The section view contains multiple article partials, and the section view is cached in full. If a change is made to an article, the partial will expire, but not the full section view - it will still show the old version of the article. |
|
This concept is very similar to that I have implemented in https://github.com/brain-geek/activerecord_cashier - though activerecord_cashier also has mechanism to automaticaly trigger cache expiration on model save. And it is also based on cashier - but in complementary way. |
In the example, today changing one of the articles' title won't be reflected in the section, since it's cached.
The feature allows tagging the article fragment with the article object, then on_save call Cashier.expire(self), which will also expire the section.