Skip to main content

normalize_cache_key

Function normalize_cache_key 

Source
pub fn normalize_cache_key(url: &str) -> String
Expand description

Normalise a URL into a canonical cache key.

§Arguments

  • url — The raw URL string (any scheme is accepted).

§Returns

A normalised String suitable for use as a cache key. If url cannot be parsed (e.g. it is an empty string) the function returns the input lowercased and stripped of trailing slashes as a best-effort fallback.