Skip to content

Instantly share code, notes, and snippets.

@danielcooper
Created July 15, 2012 21:30
Show Gist options
  • Save danielcooper/3118703 to your computer and use it in GitHub Desktop.
Save danielcooper/3118703 to your computer and use it in GitHub Desktop.
class PostsController < ActionController::Base
after_filter :set_http_cache, :only => :index
private
def set_http_cache
expires_in(30.seconds, :public => true)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment