Interface IRateLimitStore
C1 — Sliding-window counter store used by the rate-limit processors. Implementations
must be safe for concurrent use across many threads. Default impl: in-memory per-node;
optional impl: Redis (cluster-global). Selected via
.
public interface IRateLimitStore
Methods
ResetAsync(string, CancellationToken)
Forcibly resets the counter for key. Used when an authentication
Task ResetAsync(string key, CancellationToken ct = default)
TryIncrementAsync(string, int, TimeSpan, CancellationToken)
Records a hit on key within a sliding window of window
Task<RateLimitDecision> TryIncrementAsync(string key, int limit, TimeSpan window, CancellationToken ct = default)