astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- Configuration system (`astropy.config`) »
- get_cache_dir

# get_cache_dir

`astropy.config.paths.``get_cache_dir`()

  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/astropy` directory exists, it will be that directory. If neither exists, the former will be created and symlinked to the latter.

  Returns:

  cachedir : str

  > The absolute path to the cache directory.