I read rabl caching doc and I don't get how I can cache fragment of code. I have a view like this (there more code, but I removed it for simplicity's sake):
object @video
attributes :id, :user_id, :event_id
child :event do
attributes :id
node(:name) { |event| event.name }
end
child :user do
attributes :id
end
And I want to cache :event child for two hours. How can I do that?
I'm using rabl(0.7.6), rails(3.2.0), ruby(1.9.3p125)