def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):
if system == "<STR_LIT:win32>":<EOL><INDENT>if appauthor is None:<EOL><INDENT>appauthor = appname<EOL><DEDENT>path = os.path.normpath(_get_win_folder("<STR_LIT>"))<EOL>if appname:<EOL><INDENT>if appauthor is not False:<EOL><INDENT>path = os.path.join(path, appauthor, appname)<EOL><DEDENT>else:<EOL><INDENT>path = os.path.join(path, appname)<EOL><DEDENT>if opinion:<EOL><INDENT>path = os.path.join(path, "<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>elif system == '<STR_LIT>':<EOL><INDENT>path = os.path.expanduser('<STR_LIT>')<EOL>if appname:<EOL><INDENT>path = os.path.join(path, appname)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>path = os.getenv('<STR_LIT>', os.path.expanduser('<STR_LIT>'))<EOL>if appname:<EOL><INDENT>path = os.path.join(path, appname)<EOL><DEDENT><DEDENT>if appname and version:<EOL><INDENT>path = os.path.join(path, version)<EOL><DEDENT>return path<EOL>
r"""Return full path to the user-specific cache dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "appauthor" (only used on Windows) is the name of the
            appauthor or distributing body for this application. Typically
            it is the owning company name. This falls back to appname. You may
            pass False to disable it.
        "version" is an optional version path element to append to the
            path. You might want to use this if you want multiple versions
            of your app to be able to run independently. If used, this
            would typically be "<major>.<minor>".
            Only applied when appname is present.
        "opinion" (boolean) can be False to disable the appending of
            "Cache" to the base app data dir for Windows. See
            discussion below.

    Typical user cache directories are:
        Mac OS X:   ~/Library/Caches/<AppName>
        Unix:       ~/.cache/<AppName> (XDG default)
        Win XP:     C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>\Cache
        Vista:      C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>\Cache

    On Windows the only suggestion in the MSDN docs is that local settings go in
    the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming
    app data dir (the default returned by `user_data_dir` above). Apps typically
    put cache data somewhere *under* the given dir here. Some examples:
        ...\Mozilla\Firefox\Profiles\<ProfileName>\Cache
        ...\Acme\SuperApp\Cache\1.0
    OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value.
    This can be disabled with the `opinion=False` option.