MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _root_key

Function _root_key

graphify/cache.py:794–805  ·  view source on GitHub ↗

Resolved identity of a cache-key root, memoized per detect() run.

(root: Path)

Source from the content-addressed store, hash-verified

792
793
794def _root_key(root: Path) -> str:
795 """Resolved identity of a cache-key root, memoized per detect() run."""
796 raw = str(root)
797 got = _ROOT_KEY_MEMO.get(raw)
798 if got is None:
799 long_root = Path(_os_long_path(raw))
800 try:
801 got = str(_normalize_path(long_root.resolve()))
802 except OSError:
803 got = str(_normalize_path(long_root))
804 _ROOT_KEY_MEMO[raw] = got
805 return got
806
807
808def clear_run_md5() -> None:

Callers 2

file_hashFunction · 0.85

Calls 3

_normalize_pathFunction · 0.85
getMethod · 0.45
resolveMethod · 0.45

Tested by

no test coverage detected