pub struct CookieCacheConfig {
pub enabled: bool,
pub max_age: Duration,
pub strategy: CookieCacheStrategy,
}Expand description
Configuration for cookie-based session caching.
When enabled, session data is stored in a signed or encrypted cookie so that subsequent requests can skip the database lookup.
Fields§
§enabled: boolWhether the cookie cache is active.
max_age: DurationMaximum age of the cached cookie before a fresh DB lookup is required.
Default: 5 minutes.
strategy: CookieCacheStrategyStrategy used to protect the cached cookie value.
Trait Implementations§
Source§impl Clone for CookieCacheConfig
impl Clone for CookieCacheConfig
Source§fn clone(&self) -> CookieCacheConfig
fn clone(&self) -> CookieCacheConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CookieCacheConfig
impl Debug for CookieCacheConfig
Auto Trait Implementations§
impl Freeze for CookieCacheConfig
impl RefUnwindSafe for CookieCacheConfig
impl Send for CookieCacheConfig
impl Sync for CookieCacheConfig
impl Unpin for CookieCacheConfig
impl UnsafeUnpin for CookieCacheConfig
impl UnwindSafe for CookieCacheConfig
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