mirror of
https://github.com/phpredis/phpredis.git
synced 2026-06-19 07:35:31 +00:00
Implement GCRA command
This commit is contained in:
committed by
Michael Grunder
parent
c99c86349a
commit
10b77a42d6
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user