MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / buildKey

Function buildKey

apps/api/src/lib/rate-limit/valkey-context.ts:53–54  ·  view source on GitHub ↗
(rawKey: string)

Source from the content-addressed store, hash-verified

51const DISABLED_WARN_INTERVAL_MS = 60_000;
52
53/*
54 * The key carries a policy segment so each limiter owns its own counter.
55 * Sharing one key across policies means ten unrelated public requests
56 * exhaust the login budget, whichever policy touches the key first owns the
57 * TTL, and the general limiter's global `onError` refunds the failed logins

Callers 3

incrementMethod · 0.85
decrementMethod · 0.85
resetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected