pub fn cache_name(name: &str, max_len: Option<usize>) -> Option<Cow<'_, str>>Expand description
Normalize a name for use in a cache entry.
Replaces non-alphanumeric characters with dashes, and lowercases the name.
If max_len is provided, the output is truncated to at most that many bytes
(trailing dashes from truncation are stripped).