pub struct CacheConfig {
pub directory: PathBuf,
pub max_age: Duration,
pub retry: RetryConfig,
pub retry_on_429: bool,
}Expand description
Configuration for the on-disk HTTP response cache.
Fields§
§directory: PathBufDirectory where cached files are stored (created on demand).
max_age: DurationFiles older than this are considered stale and refetched.
retry: RetryConfigRetry policy used for network fetches.
retry_on_429: boolWhether to treat HTTP 429 (Too Many Requests) as a retryable response.
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§impl Debug for CacheConfig
impl Debug for CacheConfig
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnsafeUnpin for CacheConfig
impl UnwindSafe for CacheConfig
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