get_cache_dir_path#
- astropy.config.get_cache_dir_path(rootname: str = 'astropy') Path[source]#
Determines the Astropy cache directory name and creates the directory if it doesn’t exist.
This directory is typically
$HOME/.astropy/cache, but if the XDG_CACHE_HOME environment variable is set and the$XDG_CACHE_HOME/astropydirectory exists, it will be that directory. If neither exists, the former will be created and symlinked to the latter.- Parameters:
- rootname
python:str Name of the root cache directory. For example, if
rootname = 'pkgname', the cache directory will be<cache>/.pkgname/.
- rootname
- Returns:
- cachedirPath
The absolute path to the cache directory.