Skip to main content

Module cache

Module cache 

Source
Expand description

通用 Redis 缓存与固定窗口限流门面(feature = "redis")。

提供 cache-aside(get_or_load)、空值缓存、TTL 抖动、single-flight 与通用限流;安全路径(token 撤销、MFA、鉴权限流)仍保持各自模块的 fail-closed 策略,不经过本模块的 fail_open 开关。

Structs§

Cache
通用缓存门面。
CacheConfig
缓存行为配置。
RateLimitDecision
固定窗口限流结果。
RateLimiter
通用固定窗口限流器。