pub struct BillingCacheConfig {
pub fresh_ttl: Duration,
pub stale_ttl: Duration,
pub max_entries: usize,
pub failure_mode: FailureMode,
}Expand description
Bounds status-cache freshness, memory use, and outage behavior.
Fields§
§fresh_ttl: DurationAge below which a cached status can be used without contacting ATP.
stale_ttl: DurationMaximum total age of an entry eligible for FailureMode::UseStale.
max_entries: usizeMaximum number of user entries and in-flight lookup locks retained locally.
failure_mode: FailureModeBehavior when both the fresh cache and ATP are unavailable.
Implementations§
Source§impl BillingCacheConfig
impl BillingCacheConfig
Safe preset for feature authorization: ATP failures deny access.
Sourcepub fn authentication_fail_open() -> Self
pub fn authentication_fail_open() -> Self
Login-continuity preset: ATP failures produce degraded Free claims.
Do not use this preset to authorize paid work.
Sourcepub fn ui_read_optimized() -> Self
pub fn ui_read_optimized() -> Self
UI preset: a recently expired status may be shown during an ATP outage.
Trait Implementations§
Source§impl Clone for BillingCacheConfig
impl Clone for BillingCacheConfig
Source§impl Debug for BillingCacheConfig
impl Debug for BillingCacheConfig
Auto Trait Implementations§
impl Freeze for BillingCacheConfig
impl RefUnwindSafe for BillingCacheConfig
impl Send for BillingCacheConfig
impl Sync for BillingCacheConfig
impl Unpin for BillingCacheConfig
impl UnsafeUnpin for BillingCacheConfig
impl UnwindSafe for BillingCacheConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more