Cache
Less than 1 minute
Cache
Properties
cache
private Adapter $cache
prefix
private string $prefix = 'rate_limiter_'
index
private array $index
Methods
__construct
Cache rate limiter constructor.
public __construct(array $options = []): void
Parameters
Parameter | Type | Description |
---|---|---|
$options | array | the options for the cache |
shutdown
public shutdown(): void
check
public check(string $identifier): void
Parameters
Parameter | Type | Description |
---|---|---|
$identifier | string |
get
public get(string $identifier): void
Parameters
Parameter | Type | Description |
---|---|---|
$identifier | string |
remove
Removes the rate limit information for the specified identifier.
public remove(string $identifier): void
Parameters
Parameter | Type | Description |
---|---|---|
$identifier | string | the identifier for which to remove the rate limit information |
getKey
Get the key for rate limiting based on the provided identifier.
private getKey(string $identifier): string
Parameters
Parameter | Type | Description |
---|---|---|
$identifier | string | the identifier used for rate limiting |
Generated by Hazaar API Doc Generator