Skip to content

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

Open
DefV wants to merge 4 commits intocaelum:masterfrom
DefV:master
Open

Add a way to cache certain parts of a document#11
DefV wants to merge 4 commits intocaelum:masterfrom
DefV:master

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

Comments