#13285: Generic views call populate_xheaders, which breaks caching --------------------------+------------------------------------------------- Reporter: carljm | Owner: nobody Status: new | Milestone: Component: Cache system | Version: 1.1 Keywords: | Stage: Unreviewed Has_patch: 0 | --------------------------+------------------------------------------------- Many of the Django generic views (as well as the flatpage view) call django.core.xheaders.populate_xheaders on the response. Populate_xheaders checks request.user, in order to include xheaders if the logged-in user is a staff member. Checking request.user triggers session access, which causes SessionMiddleware to add Vary: Cookie to the response, which makes caching much less efficient.
There should be some way to turn off populate_xheaders in production (or at least turn off the user-is-staff check), so efficient caching can be achieved. -- Ticket URL: <http://code.djangoproject.com/ticket/13285> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.