new Memory( [options])
An in memory throttle implementation. For testing and debugging purposes only
Parameters:
Name | Type | Argument | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
- Source:
Methods
-
convert(id)
-
creates a namespaced key based on an id
Parameters:
Name Type Description id
String the internal key to record
- Source:
Returns:
key
- Type
- String
-
incr(id)
-
Records an entry for a given keyf
Parameters:
Name Type Description id
String the internal key to record
- Source:
-
toThrottle(id)
-
Checks if a given key has reached the configured throttling limit
Parameters:
Name Type Description id
String the internal key to record
- Source:
Returns:
- Type
- Boolean