```def get_pants_cachedir(): """Return the pants...
# general
b
Copy code
def get_pants_cachedir():
  """Return the pants global cache directory."""
  # Follow the unix XDB base spec: <http://standards.freedesktop.org/basedir-spec/latest/index.html>.
  cache_home = os.environ.get('XDG_CACHE_HOME')
  if not cache_home:
    cache_home = '~/.cache'
  return os.path.expanduser(os.path.join(cache_home, 'pants'))