Skip to main content

is_cache_valid

Function is_cache_valid 

Source
pub fn is_cache_valid(cached_hash: &str, current_hash: &str) -> bool
Expand description

Return true if the cached content hash still matches the current hash.

An empty current_hash always invalidates the cache to avoid silently accepting a stale result when the hash cannot be computed.