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
Is your feature request related to a problem? Please describe.
For ratelimit tracking, we currently use hashes instead of full keys for more efficient bulk retrieval (instead of using hash slots when clustering).
Currently, we need to do HINCRBY key field 1 and if the value is 1, we do a followup HSETEX key date field 1.
This means increments that happen between the HINCRBY and HSETEX command may be lost because the HSETEX command will always reset it to 1.
The EXPIRE command exists to solve this exact problem, so having HEXPIRE would prevent race conditions nicely here too.
Describe the solution you'd like HEXPIRE key field duration
Is your feature request related to a problem? Please describe.
For ratelimit tracking, we currently use hashes instead of full keys for more efficient bulk retrieval (instead of using hash slots when clustering).
Currently, we need to do
HINCRBY key field 1
and if the value is 1, we do a followupHSETEX key date field 1
.This means increments that happen between the HINCRBY and HSETEX command may be lost because the HSETEX command will always reset it to 1.
The
EXPIRE
command exists to solve this exact problem, so havingHEXPIRE
would prevent race conditions nicely here too.Describe the solution you'd like
HEXPIRE key field duration
Related
#3026 for
HTTL
The text was updated successfully, but these errors were encountered: