Create a gist now

Instantly share code, notes, and snippets.

Etag
class PostsController < ApplicationController
def show
@post = Post.find(params[:id])
if stale?(:last_modified => @post.updated_at.utc, :etag => @post)
#Render your post page
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment