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

Add a way to cache certain parts of a document #11

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

Conversation

DefV
Copy link

@DefV DefV commented Feb 11, 2014

I added a way to cache certain parts of a hypertemplate document. The syntax I have devised:

member(@item) do |member|
  member.cache("item_#{@item.id}") do |member|
    member.values do |val|
      val.slow @item.slow_method
    end
  end
end

It's a work in progress: the implementation is coupled to XML & JSON, and there are no tests. Just looking if there's interest in this, and if the approach I've taken is a good one. Any suggestions welcome. I'm using this in production with great results

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.

1 participant