Skip to content

InMemoryRateLimitStore

Defined in: src/policies/traffic/rate-limit.ts:45

Sliding-window rate limiting with pluggable counter storage (priority 20).

new InMemoryRateLimitStore(options?): InMemoryRateLimitStore

Defined in: src/policies/traffic/rate-limit.ts:52

number | InMemoryRateLimitStoreOptions

InMemoryRateLimitStore

destroy(): void

Defined in: src/policies/traffic/rate-limit.ts:106

Stop the cleanup interval (for testing)

void

RateLimitStore.destroy


increment(key, windowSeconds): Promise<{ count: number; resetAt: number; }>

Defined in: src/policies/traffic/rate-limit.ts:69

Increment the counter for a key, returning the new count and TTL

string

number

Promise<{ count: number; resetAt: number; }>

RateLimitStore.increment


reset(): void

Defined in: src/policies/traffic/rate-limit.ts:114

Reset all counters (for testing)

void