Skip to main content

read_catalog_cache

Function read_catalog_cache 

Source
pub fn read_catalog_cache(
    dir: &Path,
) -> Result<Option<(CatalogCacheMeta, Value)>, CloudflareError>
Expand description

Read the versioned catalog cache for an account-scoped directory.

Returns Ok(None) when either cache file is missing (no cache yet). Returns Err(CloudflareError::Http) on I/O failure or when a present file is truncated/corrupt JSON - the caller falls back to a live fetch or the bundled fallback catalog. Never panics.