You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
Is your feature request related to a problem?
Right now
redis.asyncio.Redis
andaioredis
have different signatures for.expire
.When wirtting code that support both versions, one has to do something like this: https://github.com/wemake-services/asyncio-redis-rate-limit/blob/6079ee499e6e8f57719519806b1d6514e121ab5a/asyncio_redis_rate_limit/compat.py#L43-L58
Describe the solution you'd like
I propose to add
nx
,xx
,gt
,lt
boolean options todef expire
, like it is inredis.py
: https://github.com/redis/redis-py/blob/d3a7a75c7b106e0864b3927c0904058e25c99958/redis/commands/core.py#L1620-L1623This will make signatures compatible.
This will also make
.set
and.expire
very similar.Describe alternatives you've considered
Using
.set(..., nx=True)
. It is not the same thing.Especially with pipelines.
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: