hypertemplate
hypertemplate copied to clipboard
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:
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