derive_key

Function derive_key 

Source
pub fn derive_key(
    route: &str,
    epoch: u64,
    identity: Option<&Identity>,
    method: &Method,
    path: &str,
    query: Option<&str>,
    vary_values: &[(String, String)],
) -> String
Expand description

Derive the store key: a SHA-256 over the domain-tagged components (route, epoch, consumer, method, path, query, vary values). Hashing keeps the key length bounded and keeps raw paths/queries out of the store’s memory-visible key space (they are never logged either way). The method component (DP-04) separates a HEAD representation (no body) from a GET representation (full body) of the same resource — they are distinct cache entries per RFC 9111 section 4.1.