Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only process response if the request reached htmlmin #61

Merged
merged 4 commits into from Nov 28, 2013

Conversation

moeffju
Copy link

@moeffju moeffju commented Nov 27, 2013

Django calls process_response for all middlewares, leading to performance problems with htmlmin in combination with a Cache middleware: the minified response is cached and delivered from cache, but minify still runs on it again.

This patch introduces a flag in the Request phase and checks it in the Response phase and only minifies when the request has also hit the middleware.

Matthias Bauer added 4 commits November 27, 2013 12:30
@andrewsmedina
Copy link
Member

@moeffju thank you!

andrewsmedina added a commit that referenced this pull request Nov 28, 2013
Only process response if the request reached htmlmin
@andrewsmedina andrewsmedina merged commit 84f3bd5 into cobrateam:master Nov 28, 2013
@moeffju
Copy link
Author

moeffju commented Nov 28, 2013

This fixes #53.

@moeffju moeffju deleted the feature/minify-only-requested branch November 28, 2013 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants