Method TryIncrementAsync(string, int, TimeSpan, CancellationToken)

Assembly: redb.Identity.Core.dll

Records a hit on key within a sliding window of window
length and returns whether the bucket is still under limit.

Task<RateLimitDecision> TryIncrementAsync(string key, int limit, TimeSpan window, CancellationToken ct = default)

Remarks

MUST behave atomically: concurrent callers either all see the increment or none do.
When is false, implementations MAY
still record the hit (extends penalty) — caller treats both modes uniformly via 429.