Skip to content

Instantly share code, notes, and snippets.

@tanelsuurhans
Created May 11, 2011 13:08
Show Gist options
  • Save tanelsuurhans/966420 to your computer and use it in GitHub Desktop.
Save tanelsuurhans/966420 to your computer and use it in GitHub Desktop.
def set_cache_buster
response.headers["Cache-Control"] = "no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "#{10.year.ago}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment