If $XDG_CONFIG_HOME is set, astropy will look for configuration files in $XDG_CONFIG_HOME/astropy/. However, it will not look for configuration files in $XDG_CONFIG_HOME/astropy/config/. Similarly, if $XDG_CACHE_HOME is set, astropy will look for cache files in $XDG_CACHE_HOME/astropy/, not $XDG_CACHE_HOME/astropy/cache. Why does the layout of $XDG_CONFIG_HOME/astropy/ have to be different from the layout of $HOME/.astropy/, which contains config/ and cache/ directories? Unless one knows that the layout is different, one would expect that $XDG_CONFIG_HOME/astropy/config/ and $XDG_CACHE_HOME/astropy/cache/ would be the directories to contain configuration and cache files.