#12263: Mixed concerns between application and http caching
---------------------------------------------+------------------------------
 Reporter:  sebbacon                         |       Owner:  nobody    
   Status:  new                              |   Milestone:            
Component:  Cache system                     |     Version:  1.1       
 Keywords:  etag http headers last-modified  |       Stage:  Unreviewed
Has_patch:  0                                |  
---------------------------------------------+------------------------------
 I've found the treatment of HTTP cache headers in Django counterintuitive.
 I'm not sure if the code or the documentation needs fixing, so this is
 more a discussion point than a bug.

 The cache middleware (in {{django.middleware.cache}} is for caching
 objects in memory.  As a side-effect, it also sets ETag and Last-Modified
 dates.

 1) I view this as a bug, as it's mixing two concerns -- application-level
 caching and HTTP caching.  It certainly threw me when trying to debug some
 HTTP caching issues, as it interacts in unexpected ways with Django's
 explicit HTTP caching facilities such as the {{cache_control}}} decorator.

 2) I'd rather HTTP caching was controlled completely separately, but if
 not, shouldn't this behaviour honour the USE_ETAGS setting that's used in
 {{django.middleware.CommonMiddleware}}?

 3) Also, if it's considered that HTTP caching should be set at the same
 time as app caching, should we consider noting in the comments that the
 ConditionalGetMiddleware should be enabled if the server is to honour
 these headers?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12263>
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.


Reply via email to