Skip to content

Instantly share code, notes, and snippets.

@nitsujw
Created November 9, 2008 22:44
Show Gist options
  • Save nitsujw/23366 to your computer and use it in GitHub Desktop.
Save nitsujw/23366 to your computer and use it in GitHub Desktop.
Show.html.haml
= fetch_partial "posts/post", :post => @post, :updated_at => (@post.updated_at rescue nil)
show action
def show(id)
@post = Post.get(id)
raise NotFound unless @post
display @post
end
The tmp/ cache
tmp/fragments/home/justin/merb/blog/app/views/posts/_post.html--
_post.html--3df99173854b0158ad6ca14be4d7d44e31b75bf191437bded3f3e26046f5a792
_post.html--cedeaf1706c64425fc3cb61ba001ae1cdbfe83a500ad5af431cf519bb0f5a588
Every hit to the show action creates a new cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment