#13283: CACHE_MIDDLEWARE_ANONYMOUS_ONLY kills anonymous caching efficiency
-----------------------------------+----------------------------------------
          Reporter:  carljm        |         Owner:  nobody                     
 
            Status:  new           |     Milestone:                             
 
         Component:  Cache system  |       Version:  SVN                        
 
        Resolution:                |      Keywords:  session accessed vary 
cookie
             Stage:  Accepted      |     Has_patch:  1                          
 
        Needs_docs:  0             |   Needs_tests:  0                          
 
Needs_better_patch:  1             |  
-----------------------------------+----------------------------------------
Comment (by carljm):

 Replying to [comment:20 natrius]:
 > Having `CACHE_MIDDLEWARE_ANONYMOUS_ONLY` at all will give users an
 incorrect mental model of how caching in general works. Anonymity is
 irrelevant. `Vary` headers are the right place for users to be looking, so
 an appropriately named option that performs the correct behavior will have
 positive educational side-effects in addition to the small performance
 benefits.

 I agree; the question is just how much deprecation churn that benefit is
 worth. I may start a django-developers thread to discuss this at some
 point, or if you want to it'd be helpful to get other developers'
 thoughts.

 Making UpdateCacheMiddleware more easily extensible is potentially
 interesting; I'm not sure I want to start proliferating subclasses of it
 in Django, though, so I'm still more inclined towards a setting
 (CACHE_MIDDLEWARE_SKIP_VARY_COOKIE?). I think it's also possible that we
 could just make the behavior change you're suggesting (cache non-Vary-
 Cookie only, regardless of anonymity), and leave the slightly-misleading
 setting name, with a documentation note about the name, to reduce
 deprecation churn.

 In any case, this needs to be split into two changes at this point.
 Pre-1.3, I'd like to fix the most pressing issue, which is adding Vary:
 Cookie when it shouldn't be there. That's a bugfix. The rest of this is
 more in feature territory; now that we're post-beta for 1.3 I don't think
 we can deprecate the current setting, add a new one, or make additional
 behavior changes, so that's a discussion for the 1.4 timeframe.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13283#comment:21>
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-updates@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.

Reply via email to