#NEWLINE# def user_cache_dir( appname ) : #NEWLINE# #INDENT# '\n    Return full path to the user-specific cache dir for this application.\n\n        "appname" is the name of application.\n\n    Typical user cache directories are:\n        Mac OS X:   ~/Library/Caches/<AppName>\n        Unix:       ~/.cache/<AppName> (XDG default)\n        Windows:      C:\\Users\\<username>\\AppData\\Local\\<AppName>\\Cache\n\n    On Windows the only suggestion in the MSDN docs is that local settings go\n    in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the\n    non-roaming app data dir (the default returned by `user_data_dir`). Apps\n    typically put cache data somewhere *under* the given dir here. Some\n    examples:\n        ...\\Mozilla\\Firefox\\Profiles\\<ProfileName>\\Cache\n        ...\\Acme\\SuperApp\\Cache\\1.0\n\n    OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value.\n    ' #NEWLINE# if WINDOWS : #NEWLINE# #INDENT# path = os . path . normpath ( _get_win_folder ( 'CSIDL_LOCAL_APPDATA' ) ) #NEWLINE# path = os . path . join ( path , appname , 'Cache' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( sys . platform == 'darwin' ) : #NEWLINE# #INDENT# path = os . path . expanduser ( '~/Library/Caches' ) #NEWLINE# path = os . path . join ( path , appname ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# path = os . getenv ( 'XDG_CACHE_HOME' , os . path . expanduser ( '~/.cache' ) ) #NEWLINE# path = os . path . join ( path , path ) #NEWLINE# #UNINDENT# #UNINDENT# return path