Get the default Linux cache dir.
(name: str)
| 45 | |
| 46 | |
| 47 | def _linux_cache_dir(name: str) -> Path: |
| 48 | """Get the default Linux cache dir.""" |
| 49 | env_base = os.getenv("XDG_CACHE_HOME") |
| 50 | base = Path(env_base) if env_base else Path.home() / ".cache" |
| 51 | return base / name |
| 52 | |
| 53 | |
| 54 | def _get_valid_user_cache_dir() -> Path | None: |
no outgoing calls