bitbox-wallet-app icon indicating copy to clipboard operation
bitbox-wallet-app copied to clipboard

Cache data should be stored in ~/.cache/bitbox per XDG spec

Open micressor opened this issue 5 months ago • 2 comments

Currently, the BitBox app stores cach- and config data under ~/.config/bitbox/cache.

According to the XDG Base Directory Specification, cache data should be placed in ~/.cache/bitbox (or ${XDG_CACHE_HOME}/bitbox if set).

I just noticed this while using the test mode when the headers were downloaded.

micressor avatar Jul 30 '25 16:07 micressor

Could you link to the relevant part of the spec?

What would be the benefit of changing the current path?

benma avatar Aug 01 '25 06:08 benma

  • $XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If
  • $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
  • $XDG_CACHE_HOME defines the base directory relative to which user-specific non-essential data files should be stored. If
  • $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used.

https://specifications.freedesktop.org/basedir-spec/latest/

The ~/.cache directory is used for non-essential cached data that applications can regenerate. It's safe to delete periodically to free up space; apps may just re-cache on next run.

The ~/.config directory stores persistent application configurations and state. Deleting its contents can reset user preferences or break app functionality.

micressor avatar Aug 01 '25 07:08 micressor