Posted via email from gissmog
Rails.
git clone git://github.com/kshaikh/timed_fragment_cache.gitor
script/plugin install git://github.com/kshaikh/timed_fragment_cache.git
when_fragment_expired 'some_posts', 1.hour.from_now do
@posts = Post.find( :all )
end In your view:
<%- cache 'some_posts' -%>
<%- @posts.each do |post| -%>
<%= @post.title %>
<%- end -%>
<%- end -%>