pyphi.cache.disk.maybe_disk_cached#

pyphi.cache.disk.maybe_disk_cached(system, kind, user_kwargs, compute)[source]#

Return a disk-cached result for compute() when it is safe to.

Bypasses (just calls compute()) when the cache is disabled, when the caller passed result-affecting kwargs the key cannot capture, or when the git tree is dirty (result_cache_key returns None). A hit is decoded with the requesting system’s node labels (the key is label-free, so an equivalent system with different labels may have produced the entry).

Parameters:
Return type:

Any