Skip to main content

cache_key

Function cache_key 

Source
pub fn cache_key(target_url: &str, content_type: &str, body: &[u8]) -> String
Expand description

Computes a stable cache key for a QUERY request.

Unlike GET, a QUERY cache entry must be keyed on the request content in addition to the method and URI (RFC 10008 ยง2.7), because the query travels in the body. The returned value is the hex-encoded SHA-256 of those inputs.