Dragonfly specific commands¶
To implement support for a command, see here
These are commands that are not implemented in Redis but supported in Dragonfly and FakeRedis. To use these commands,
you can call execute_command with the command name and arguments as follows:
SADDEX¶
Similar to SADD but adds one or more members that expire after specified number of seconds. An error is returned when the value stored at key is not a set.
CL.THROTTLE¶
CL.THROTTLE key max_burst count_per_period period [quantity]
Applies a rate limit to key using the generic cell rate algorithm (GCRA), a leaky bucket over a rolling time window.
quantity (the number of tokens the request costs, 1 by default) is applied to a bucket of max_burst + 1 tokens that
refills at count_per_period tokens every period seconds. Replies with an array of five integers:
- Whether the action was limited:
0if it is allowed,1if it was blocked. - The total limit of the key (
max_burst + 1), equivalent toX-RateLimit-Limit. - The remaining limit of the key, equivalent to
X-RateLimit-Remaining. - The number of seconds until the caller should retry,
-1if the action was allowed. Equivalent toRetry-After. - The number of seconds until the limit resets to its maximum capacity, equivalent to
X-RateLimit-Reset.