Skip to main content

parse_cache_control

Function parse_cache_control 

Source
pub fn parse_cache_control(
    extras: &HashMap<String, Value>,
) -> Option<CacheControlConfig>
Expand description

Parse CacheControlConfig from a request’s tt_extras map.

Returns None when tt_extras does not contain a "cache" key. Returns the default config (normal mode, no TTL override) when the key is present but the value fails to deserialize — so a malformed field degrades gracefully rather than hard-failing.