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.
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.
-
Implemented in #1330 |
Beta Was this translation helpful? Give feedback.
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.