foretoken v0.3.0 Foretoken.Config View Source
Foretoken
defines the following application configs:
:inactive_threshold
: Threshold duration (in milliseconds) to judge whether each bucket can be removed or not. Buckets that haven’t been used within this duration are regarded as removable. In order to avoid losing status of a bucket by removal, this duration should be longer thanmax_tokens * milliseconds_per_token
. Note thatForetoken.take/5
by default creates a bucket on-demand if it doesn’t exist. Defaults to600000
.:bucket_cleanup_interval
: Time interval (in milliseconds) between periodic cleanup of inactive buckets. Defaults to600000
.
Link to this section Summary
Link to this section Functions
Link to this function
bucket_cleanup_interval()
View Source
bucket_cleanup_interval() :: pos_integer()