Changes between Initial Version and Version 1 of Ticket #33573, comment 19


Ignore:
Timestamp:
Apr 7, 2025, 9:36:15 PM (6 months ago)
Author:
amirreza

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33573, comment 19

    initial v1  
    55
    66== so the first problem that needs solving is the [https://github.com/django/django/blob/main/django/core/cache/__init__.py#L61-L64) cleaup] discussed in #36047
     7this is the main problem that we're dealing with, the rest are mostly just new features
     8
    79since this is a signal receiver and signal receiver can be [https://docs.djangoproject.com/en/5.1/topics/signals/#receiver-functions async] since django 5, i can see this fixed like this:
    810
     
    5658
    57591. cache middlewares do not accept an async only cache backend
    58 to solve this we either have to combine the two backends (as discussed above) (in this case the async methods won't even be called, it just doesn't break),
    59 or have new middlewares that support async (i like this one, but i guess others don't)
     60
     61to solve this we either have to combine the two backends (as discussed above)
     62this one is a bit of a lie, with this way, middleware is still sync, it only calls sync cache methods
     63it just allows for the user to call async methods, while having the middleware as well
     64
     65or have new middlewares that support async (i like this one, but i guess some people don't)
    6066
    6167
Back to Top