class
Illuminate
/
Queue
/
Middleware
/
RateLimitedWithRedis
You are viewing an older version of the documentation. For the latest, please visit master documentation.
RateLimitedWithRedis
Extends
Uses
Properties
public
$decaysAt array
The timestamp of the end of the current duration by key.
Default: []
Methods
public
__construct ( $limiterName ) : void
Create a new middleware instance.
Parameters
- $limiterName string
protected
handleJob ( $job , $next , array $limits ) : mixed
Handle a rate limited job.
Parameters
- $job mixed
- $next callable
- $limits array
protected
tooManyAttempts ( $key , $maxAttempts , $decayMinutes ) : bool
Determine if the given key has been "accessed" too many times.
Parameters
- $key string
- $maxAttempts int
- $decayMinutes int
protected
getTimeUntilNextRetry ( $key ) : int
Get the number of seconds that should elapse before the job is retried.
Parameters
- $key string
public
__wakeup ( ) : void
Prepare the object after unserialization.