Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Carry #208] Use the XDG Basedir Spec for the cache #250

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Dec 22, 2020

  1. Configuration menu
    Copy the full SHA
    2e2fb90 View commit details
    Browse the repository at this point in the history
  2. Use the XDG Basedir Spec for the cache

    Currently, for caching data, a new directory is created in the current
    user's home directory. This is bad practice (if all apps just dump files
    into the user's home, it becomes somewhat unmaintainable).
    
    The XDG Basedir Specification covers this pretty neatly; the cache
    directory for all applications is configurable via the `XDG_CACHE_HOME`
    variable, and falls back to `~/.cache` if unset.
    
    The os.UserCacheDir function returns the per-platorm cache dir, since
    the XDG-Basedir is *nix-specific (except macOS).
    
    This changeset makes the cache for all applications live in one single
    location, rather that littering the user's home.
    
    Co-authored-by: Samuel Karp <[email protected]>
    Hugo Osvaldo Barrera and samuelkarp committed Dec 22, 2020
    Configuration menu
    Copy the full SHA
    efa02df View commit details
    Browse the repository at this point in the history