resolve_request_cache_key

Function resolve_request_cache_key 

Source
pub(crate) fn resolve_request_cache_key(
    key: &str,
) -> Result<RequestCacheKey<'_>, ApiError>
Expand description

THE resolver for the {key} of GET and DELETE /api/v1/cache/{key}.

Accepts exactly the strings cache_key_from_parts can produce, by rebuilding each candidate with it rather than parsing the suffixes a second way: the writer and this reader cannot disagree about what a key looks like. Anything else – a bare digest, an internal storage key with its -json-v6 / -parquet-v8 suffix, arbitrary text – is a 400, which also keeps DELETE’s index walk out of reach of a caller-shaped string (#4582).