class RateLimitedWithRedis extends RateLimited (View source)
InteractsWithTime |
protected RateLimiter | $limiter | The rate limiter instance. | from RateLimited |
protected string | $limiterName | The name of the rate limiter. | from RateLimited |
bool | $shouldRelease | Indicates if the job should be released if the limit is exceeded. | from RateLimited |
protected Factory | $redis | The Redis factory implementation. | |
array | $decaysAt | The timestamp of the end of the current duration by key. |
void | __construct(string $limiterName) Create a new middleware instance. | |
mixed | handle(mixed $job, callable $next) Process the job. | from RateLimited |
mixed | handleJob(mixed $job, callable $next, array $limits) Handle a rate limited job. | |
$this | dontRelease() Do not release the job back to the queue if limit is exceeded. | from RateLimited |
int | getTimeUntilNextRetry(string $key) Get the number of seconds that should elapse before the job is retried. | |
int | secondsUntil(DateTimeInterface|DateInterval|int $delay) Get the number of seconds until the given DateTime. | from InteractsWithTime |
int | availableAt(DateTimeInterface|DateInterval|int $delay = 0) Get the "available at" UNIX timestamp. | from InteractsWithTime |
DateTimeInterface|int | parseDateInterval(DateTimeInterface|DateInterval|int $delay) If the given value is an interval, convert it to a DateTime instance. | from InteractsWithTime |
int | currentTime() Get the current system time as a UNIX timestamp. | from InteractsWithTime |
bool | tooManyAttempts(string $key, int $maxAttempts, int $decayMinutes) Determine if the given key has been "accessed" too many times. |
Create a new middleware instance.
Process the job.
Handle a rate limited job.
Do not release the job back to the queue if limit is exceeded.
Get the number of seconds that should elapse before the job is retried.
Get the number of seconds until the given DateTime.
Get the "available at" UNIX timestamp.
If the given value is an interval, convert it to a DateTime instance.
Get the current system time as a UNIX timestamp.
Determine if the given key has been "accessed" too many times.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Queue/Middleware/RateLimitedWithRedis.html