pub struct StoreAuthConfig {
pub traffic_mode: TrafficRecordingMode,
pub batch_flush_interval: Duration,
pub batch_max_pending: usize,
pub cache_enabled: bool,
pub cache_ttl: Duration,
pub neg_cache_ttl: Duration,
pub stale_ttl: Duration,
}Expand description
Shared configuration consumed by StoreAuth.
Backend-specific configs (e.g. SqlAuthConfig) extract a StoreAuthConfig
internally when constructing the StoreAuth wrapper.
Fields§
§traffic_mode: TrafficRecordingModeTraffic recording mode.
batch_flush_interval: DurationBatch flush interval (only used with TrafficRecordingMode::Batched).
batch_max_pending: usizeMaximum pending traffic updates before a forced flush.
cache_enabled: boolWhether to enable authentication result caching.
cache_ttl: DurationPositive cache entry TTL.
neg_cache_ttl: DurationNegative cache entry TTL (invalid-hash rejection cache).
Set to Duration::ZERO to disable negative caching.
stale_ttl: DurationStale-while-revalidate window beyond the positive cache TTL.
When a cache entry is past cache_ttl but within cache_ttl + stale_ttl,
the cached result is returned immediately while a background revalidation
is spawned. Set to Duration::ZERO to disable (default).
Trait Implementations§
Source§impl Clone for StoreAuthConfig
impl Clone for StoreAuthConfig
Source§fn clone(&self) -> StoreAuthConfig
fn clone(&self) -> StoreAuthConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more