MCPcopy Create free account
hub / github.com/anelson/tracers / cache_object_computation

Function cache_object_computation

tracers-codegen/src/cache.rs:65–88  ·  view source on GitHub ↗

Similar to `cache_file_computation`, except the computation is not on the contents of a file but rather on some arbitrary object with a name and a hash. If the computation has previously been performed on the same name and hash, the previous result is returned. Otherwise the computation is performed and saved in the cache for future invocations.

(
    cache_path: &Path,
    object_name: &str,
    hash: HashCode,
    key: &str,
    f: F,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

caches_objects_resultsFunction · 0.85
caches_generated_dataFunction · 0.85
process_providerFunction · 0.85

Calls 2

cached_results_pathFunction · 0.85
cache_generated_fileFunction · 0.85

Tested by 2

caches_objects_resultsFunction · 0.68
caches_generated_dataFunction · 0.68