On Fri, Jan 25, 2019 at 9:39 AM Linus Lewandowski <
linus.lewandow...@netguru.co> wrote:

> True, probably a way to access headers without marking them as used would
> be required - maybe something like request.headers.get(XYZ,
> vary_response=False).
>
> However, right now people are commonly forgetting to patch Vary, which
> leads to problems with caching. This way - this won't happen ever again;
> but in some cases, we might make caching less efficient than possible,
> because somebody used request.headers[XYZ] and not request.headers.get(XYZ,
> vary_response=False). Given these two cases - I feel that working correctly
> is more important than perfectly-efficient caching - but opinions here may
> differ.
>

My immediate thought here is: if people already aren't taking the time to
patch using the existing mechanism, they also aren't going to take the time
to opt out of patching. So what you're proposing is effectively still "any
accessed header patches Vary". And that seems like it's as bad as the
problem it's trying to solve.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAL13Cg-m7QgGbvFvX89Sd5UMz1HgTmKOiU8sdBZ_zoRRNNuk_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to