def get_xdg_cache_dir():
 env = os.environ
 if ((os.name == 'posix') and (sys.platform != 'darwin')):
  xdg = (env.get('XDG_CACHE_HOME', None) or os.path.join(get_home_dir(), '.cache'))
  if (xdg and _writable_dir(xdg)):
   return py3compat.cast_unicode(xdg, fs_encoding)
 return None

def get_xdg_cache_dir ( ) : env = os . environ if ( ( os . name == 'posix' ) and ( sys . platform != 'darwin' ) ) : xdg = ( env . get ( 'XDG_CACHE_HOME' , None ) or os . path . join ( get_home_dir ( ) , '.cache' ) ) if ( xdg and _writable_dir ( xdg ) ) : return py3compat . cast_unicode ( xdg , fs_encoding ) return None
return the xdg_cache_home .