def user_cache_dir(appname):
 if WINDOWS:
  path = os.path.normpath(_get_win_folder('CSIDL_LOCAL_APPDATA'))
  path = os.path.join(path, appname, 'Cache')
 elif (sys.platform == 'darwin'):
  path = expanduser('~/Library/Caches')
  path = os.path.join(path, appname)
 else:
  path = os.getenv('XDG_CACHE_HOME', expanduser('~/.cache'))
  path = os.path.join(path, appname)
 return path

def user_cache_dir ( appname ) : if WINDOWS : path = os . path . normpath ( _get_win_folder ( 'CSIDL_LOCAL_APPDATA' ) ) path = os . path . join ( path , appname , 'Cache' ) elif ( sys . platform == 'darwin' ) : path = expanduser ( '~/Library/Caches' ) path = os . path . join ( path , appname ) else : path = os . getenv ( 'XDG_CACHE_HOME' , expanduser ( '~/.cache' ) ) path = os . path . join ( path , appname ) return path
return full path to the user-specific cache dir for this application .