compute_cache_key

Function compute_cache_key 

Source
pub fn compute_cache_key(url: &Url) -> CacheKeyInfo
Expand description

Compute cache key information from a URL.

The cache path uses 2-level directory sharding to prevent directory overcrowding: {host}/{hash[0:2]}/{hash[2:4]}/{hash}-{filename}

Example:

  • URL: https://eure.dev/v0.1.0/schemas/eure-schema.schema.eure
  • Path: eure.dev/a1/b2/a1b2c3d4-eure-schema.schema.eure