Implement GCRA command

This commit is contained in:
michael-grunder
2026-03-20 09:42:39 -07:00
committed by Michael Grunder
parent c99c86349a
commit 10b77a42d6
11 changed files with 132 additions and 4 deletions
+19
View File
@@ -5269,6 +5269,25 @@ class Redis {
*/
public function vlinks(string $key, mixed $member, bool $withscores = false): Redis|array|false;
/**
* Get rate limiting information
*
* @param string $key
* @param int $maxBurst
* @param int $requestsPerPeriod
* @param int $period
* @param int $numRequests = 0
* @return Redis|array|false
*
* @see https://redis.io/docs/latest/commands/gcra/
*
* @example
* $redis->gcra('user:123', 10, 100, 3600);
*/
public function gcra(string $key, int $maxBurst, int $requestsPerPeriod,
int $period, int $numRequests = 0): Redis|array|false;
/**
* Truncate a STREAM key in various ways.
*