bundles / astropy 7.0.1 / astropy / config / paths / get_cache_dir
staticmethod
astropy.config.paths:get_cache_dir
source: /astropy/config/paths.py :113
Signature
staticmethod
def get_cache_dir ( rootname : str = astropy ) → str Summary
Determines the Astropy cache directory name and creates the directory if it doesn't exist.
Extended Summary
This directory is typically $HOME/.astropy/cache, but if the XDG_CACHE_HOME environment variable is set and the $XDG_CACHE_HOME/astropy directory exists, it will be that directory. If neither exists, the former will be created and symlinked to the latter.
Parameters
rootname: strName of the root cache directory. For example, if
rootname = 'pkgname', the cache directory will be<cache>/.pkgname/.
Returns
cachedir: PathThe absolute path to the cache directory.
See also
- get_cache_dir_path
same as this function, except that the return value is a pathlib.Path
Aliases
-
astropy.config.get_cache_dir -
astropy.config.set_temp_cache._default_path_getter