Is there any way to access the Redis client? #1338
-
I'm using cache with Redis backend but we only have get/set/delete methods. Is there any way to run different commands? I would like to run a count so I get the number of all items from the cache with a certain prefix for the cache key so I can count the number of online users. |
Beta Was this translation helpful? Give feedback.
Answered by
provinzkraut
Mar 17, 2023
Replies: 2 comments
-
There is, but not through a public API unfortunately. You can use Check out #1330, which proposes a new API for this, that would greatly simplify this access. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
provinzkraut
-
Implemented in #1330 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is, but not through a public API unfortunately.
You can use
cache.backend._redis
to get the client used.Check out #1330, which proposes a new API for this, that would greatly simplify this access.