utils.get_cache_dir()

Get cache directory with fallback to system cache.

Usage

Source

utils.get_cache_dir(cache_dir=None)

Determines the cache directory to use based on the following priority: 1. Provided cache_dir parameter 2. ‘FREEZEBASE_CACHE’ environment variable 3. System cache directory (via platformdirs)

Parameters

cache_dir: str, Path, or None = None
Explicit cache directory.

Returns

Path
Selected cache directory.

Notes

The system cache location varies by platform:

  • Linux: ~/.cache/freezebase
  • macOS: ~/Library/Caches/freezebase
  • Windows: %LOCALAPPDATA%\freezebase\Cache