Skip to content

Instantly share code, notes, and snippets.

@Spaceghost
Forked from tanelsuurhans/gist:966420
Created May 11, 2011 14:01
Show Gist options
  • Save Spaceghost/966493 to your computer and use it in GitHub Desktop.
Save Spaceghost/966493 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