GCRA.RESET
GCRA.RESET key [key ...]
- Group
- Rate limiting
- Complexity
- O(n), n being the keys
- Arity
- -2 (at least 2 words, counting the command name)
- Flags
- write, fast
- Keys
- first 1, last final argument, step 1
- HotKV Cloud
- All plans
- On-Premise
- no license needed
GCRA.RESET deletes the rate limit state that
GCRA.LIMIT keeps at each key, so the next request
for that key starts with the full burst available.
It deletes the keys whatever they hold, like DEL, so only pass keys you use for rate limiting.
Return value
Section titled “Return value”| Case | RESP2 | RESP3 |
|---|---|---|
| Always | Integer: the number of keys deleted | Integer |
Examples
Section titled “Examples”127.0.0.1:6379> GCRA.LIMIT ratelimit:user:42 60000 11) (integer) 02) (integer) 13) (integer) 04) (integer) -15) (integer) 60000127.0.0.1:6379> GCRA.LIMIT ratelimit:user:42 60000 11) (integer) 12) (integer) 13) (integer) 04) (integer) 600005) (integer) 60000127.0.0.1:6379> GCRA.RESET ratelimit:user:42 ratelimit:user:43(integer) 1127.0.0.1:6379> GCRA.LIMIT ratelimit:user:42 60000 11) (integer) 02) (integer) 13) (integer) 04) (integer) -15) (integer) 60000The millisecond values depend on the time between calls.
Compatibility
Section titled “Compatibility”HotKV-only command.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.