Skip to content

Instantly share code, notes, and snippets.

@artofhuman
Created February 5, 2013 11:18
Show Gist options
  • Save artofhuman/4713823 to your computer and use it in GitHub Desktop.
Save artofhuman/4713823 to your computer and use it in GitHub Desktop.
nocachemidleware
class NoCacheMiddleware(object):
def process_response(self, request, response):
response['Pragma'] = 'no-cache'
response['Cache-Control'] = 'private, max-age=0, proxy-revalidate, no-store, no-cache, must-revalidate'
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment