Created
July 21, 2012 16:12
-
-
Save gilsondev/3156291 to your computer and use it in GitHub Desktop.
Middleware que impede o cache da página pelo navegador (bom para desenvolvimento)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NoCacheMiddleware(object): | |
def process_response(self, request, response): | |
request.META['HTTP_CACHE_CONTROL'] = "no-cache" | |
return response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
MIDDLEWARE_CLASSES += ( | |
'project_app.utils.middleware.NoCacheMiddleware', | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment