caelum/hypertemplate — pull request #11 by DefV (2014-02-11 09:19:54+00:00)
Title: Add a way to cache certain parts of a document

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

```ruby
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