fn max_age(response: &reqwest::Response) -> u32 {
    if let Some(cache_control_header) = response.headers().get_011::<CacheControl>() {
        for cache_directive in cache_control_header.iter() {
            if let CacheDirective::MaxAge(max_age) = cache_directive {
                return *max_age;
            }
        }
    }

    // Default to four hours.
    4 * 60 * 60
}
/// Get the cache max-age of an HTTP reponse.
Get the cache max-age of an HTTP reponse.
Get the cache max - age of an HTTP reponse .
fn max_age(response: &reqwest::Response) -> u32 {
    if let Some(cache_control_header) = response.headers().get_011::<CacheControl>() {
        for cache_directive in cache_control_header.iter() {
            if let CacheDirective::MaxAge(max_age) = cache_directive {
                return *max_age;
            }
        }
    }
    // Default to four hours.
    4 * 60 * 60
}
fn max_age ( response : & reqwest :: Response ) -> u32 { if let Some ( cache_control_header ) = response . headers ( ) . get_011 :: < CacheControl > ( ) { for cache_directive in cache_control_header . iter ( ) { if let CacheDirective :: MaxAge ( max_age ) = cache_directive { return * max_age ; } } } // Default to four hours. 4 * 60 * 60 }
Get the cache max-age of an HTTP reponse.
Get the cache max - age of an HTTP reponse .
response
&reqwest::Response
response
&reqwest::Response