Return the current cache dir, lazily creating a session temp on first use.
()
| 36 | |
| 37 | |
| 38 | def 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 | |
| 47 | def set_cache_dir(path: Path) -> None: |
no outgoing calls
no test coverage detected