Skip to content

kshaikh/timed_fragment_cache

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timed_fragment_cache

git clone git://github.com/kshaikh/timed_fragment_cache.git
in your vendors/plugin directory

or

script/plugin install git://github.com/kshaikh/timed_fragment_cache.git

In your controller

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 -%>

Khalid Shaikh khalid.j.shaikh@gmail.com

About

timed_fragment_cache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%