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


Ignore:
Timestamp:
Oct 12, 2024, 6:00:23 PM (5 weeks ago)
Author:
Christopher Bailey

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33573, comment 13

    initial v1  
    22
    33If a cache is capable of both sync and async, it should raise an exception when used in the wrong context rather than forcing it to be a configuration/usage issue.
     4
     5Django also automatically applies `sync_to_async` to caches as well. So, this will make it so the default sync cache will automatically wrap it to be async (inefficiently) if used in the wrong context and the async native cache will raise a `NotImplemented` error if used in the wrong context. That is really inconsistent between the two and could definitely lead to confusion.
Back to Top