mirror of
https://github.com/PrivateCaptcha/PrivateCaptcha.git
synced 2026-02-11 16:29:00 -06:00
- more aggressive caching of API keys and added cache warmup - remove direct DB access in APIkey() middleware immediately - decrease resources usage for test puzzles - decrease cache collision possibility for cached solved puzzles - cosmetic improvement in rate limiter and leaky bucket Updater logic - move user limits check and API key backfill to a separate goroutine
19 lines
306 B
Go
19 lines
306 B
Go
package common
|
|
|
|
type ContextKey int
|
|
|
|
const (
|
|
TraceIDContextKey ContextKey = iota
|
|
PropertyContextKey
|
|
APIKeyContextKey
|
|
LoggedInContextKey
|
|
SessionContextKey
|
|
SitekeyContextKey
|
|
SecretContextKey
|
|
RateLimitKeyContextKey
|
|
SessionIDContextKey
|
|
TimeContextKey
|
|
// Add new fields _above_
|
|
CONTEXT_KEYS_COUNT
|
|
)
|