Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containers support #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Containers support #16

wants to merge 3 commits into from

Conversation

ylarom
Copy link

@ylarom ylarom commented Jan 31, 2013

  1. Support ActiveRecord as tag ("#{obj.class.name}-#{obj.to_param}")
  2. Detect dependencies of fragments containing other fragments, e.g., several article fragments displayed in a section fragment, and when the inner fragment is expired also expire its containers.
    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.

@ahawkins
Copy link
Owner

How is this better than Rails 4's support for russian doll caching?

@ftbl
Copy link

ftbl commented Feb 26, 2013

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.
In order for the section view to expire, every change to an article should "touch" all the sections it's displayed on, which could be a costly operation, not to mention it's not a true business need - we'll be doing it only for view purposes.

@brain-geek
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants