ThrottlerStorage
interface ThrottlerStorage {
storage: Record<string, ThrottlerStorageOptions>
increment(key: string, ttl: number): Promise<ThrottlerStorageRecord>
}
Properties
Property | Description |
---|---|
storage: Record<string, ThrottlerStorageOptions>
|
The internal storage with all the request records. The key is a hashed key based on the current context and IP. |
Methods
increment() |
---|
Increment the amount of requests for a given record. The record will automatically be removed from the storage once its TTL has been reached. |