Skip to content

Instantly share code, notes, and snippets.

@jzajpt
Created June 26, 2012 15:35
Show Gist options
  • Save jzajpt/2996464 to your computer and use it in GitHub Desktop.
Save jzajpt/2996464 to your computer and use it in GitHub Desktop.
Rails controllers - No caching
before_filter :set_caching_headers
def set_caching_headers
response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "0"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment