analytics: true in the options.
All data is stored in the same Redis database and writing analytics uses 1
command per .limit invocation.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
analytics: true in the options.
All data is stored in the same Redis database and writing analytics uses 1
command per .limit invocation.
const ratelimit = new Ratelimit({
redis: Redis.fromEnv(),
limiter: Ratelimit.tokenBucket(5, "10 s", 10),
analytics: true, // <- Enable analytics
});
Was this page helpful?