Skip to content

Instantly share code, notes, and snippets.

@jonuts
Created November 8, 2009 11:07
Show Gist options
  • Save jonuts/229233 to your computer and use it in GitHub Desktop.
Save jonuts/229233 to your computer and use it in GitHub Desktop.
# before :no_cache, :only => [:list, :of, :actions]
class Application
def no_cache
headers["Last-Modified"] = Time.now.httpdate
headers["Pragma"] = "no-cache"
headers["Cache-Control"] = "no-store, no-cache, must-revalidate, max-age=0, pre-check=0, post-check=0"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment