#31949: ASGI - Cache Middleware and some view decorators broken
--------------------------------+--------------------------------------
     Reporter:  Michael Galler  |                    Owner:  nobody
         Type:  Bug             |                   Status:  new
    Component:  Core (Other)    |                  Version:  3.1
     Severity:  Normal          |               Resolution:
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------
Changes (by felixxm):

 * cc: Andrew Godwin (added)
 * component:  Uncategorized => Core (Other)


Comment:

 > The cache middleware is broken because it inherits from MiddlewareMixin
 and override the init method.

 An issue with the MiddlewareMixin subclasses is already handled in #31928.

 > Also the most view decorators are broken on async views, because the
 dont provide async/await.
 >
 > For example:
 >
 > {{{
 > cache_control
 > xframe_options_deny
 > vary_on_cookie
 > }}}

 You should be able to chain them with `@sync_to_async()`, if necessary. Am
 I missing sth?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31949#comment:2>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.09916f96548ef6d58138f6ba08703fa3%40djangoproject.com.

Reply via email to