Changes between Initial Version and Version 4 of Ticket #33573


Ignore:
Timestamp:
Mar 14, 2022, 9:22:09 AM (3 years ago)
Author:
Christopher Bailey
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33573

    • Property Cc Andrew Chen Wang Andrew Godwin Carlton Gibson added
    • Property Triage Stage UnreviewedSomeday/Maybe
  • Ticket #33573 – Description

    initial v4  
    1 The latest version of redis-py will support both sync and async clients so `sync_to_async` will no longer be necessary so it would be nice if the out of the box Redis cache backend supports both natively as well.
     1  Do you have an idea for implementation? As far as I'm aware this would require initializing two redis clients: async and non-async.
    22
    3 https://github.com/redis/redis-py/releases/tag/v4.2.0rc1
     3I kind of started to implement it, but then realized it was likely going to be a bigger issue then I though. But there is already an abstract RedisClient class that is a wrapper around the base redis.Redis class. It maintains connection polls and handles all of the core commands. It has methods for `get`, `set`, `add`, `touch`, `incr` that just calls `get_client` and makes a new client using the existing connection pull any time it is called.
    44
    5 It may be a bit premature since 4.2.0 is still RC, but I wanted to get a ticket out there so it can be on someones radar.
     5For Async we can just add something like `get_async_client` and follow the same pattern within the class. I believe the connection poll should be able to be reused between the sync/async clients.
     6
Back to Top