MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _cache_path

Function _cache_path

SLiCAP/schematic/latex_label.py:239–241  ·  view source on GitHub ↗
(expr_str: str)

Source from the content-addressed store, hash-verified

237
238
239def _cache_path(expr_str: str) -> Path:
240 h = hashlib.sha256((_FORMAT_VERSION + "\x00" + expr_str).encode()).hexdigest()[:24]
241 return get_cache_dir() / f"{h}.svg"
242
243
244def _render_cached(expr_str: str) -> bytes | None:

Callers 1

_render_cachedFunction · 0.85

Calls 1

get_cache_dirFunction · 0.85

Tested by

no test coverage detected