MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / get_cache_dir

Function get_cache_dir

SLiCAP/schematic/latex_label.py:38–44  ·  view source on GitHub ↗

Return the current cache dir, lazily creating a session temp on first use.

()

Source from the content-addressed store, hash-verified

36
37
38def get_cache_dir() -> Path:
39 """Return the current cache dir, lazily creating a session temp on first use."""
40 global CACHE_DIR
41 if CACHE_DIR is None:
42 CACHE_DIR = Path(tempfile.mkdtemp(prefix="slicap_latex_"))
43 CACHE_DIR.mkdir(parents=True, exist_ok=True)
44 return CACHE_DIR
45
46
47def set_cache_dir(path: Path) -> None:

Callers 5

_ensure_slicapFunction · 0.85
_cache_pathFunction · 0.85
_render_latex_strFunction · 0.85
_latex_to_svgFunction · 0.85
render_latex_rawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected