#25782: Discourage usage of cache_page decorator with UpdateCacheMiddleware (or
make middleware ignore decorated views)
-------------------------------+--------------------
     Reporter:  int-ua         |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 If django.middleware.cache.UpdateCacheMiddleware is active and some view
 is decorated with the cache_page that overrides cache alias, this view
 will be cached in both caches, first time by cache_page and then by the
 middleware. Well, at least it will try. And fail if the default cache is
 memcached and the view response is bigger than its' maximum entry size.
 While filebased cache will work and even create the cache entry. This way
 first user to visit when there are no entry in cache will get error
 instead of data.
 So, I guess there should be some warning about this in the docs.
 Ideally, middleware should ignore views with overridden cache alias, maybe
 by means of checking headers like in case of the cache_control decorator.

--
Ticket URL: <https://code.djangoproject.com/ticket/25782>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.9fb04254eadc19b9dbe52311386a33d8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to