Vscode-cpptools: Use XDG_CACHE_HOME on Linux systems for the default cache path

Created on 25 Jul 2019  路  6Comments  路  Source: microsoft/vscode-cpptools

Type: General
There is no sense in polluting the home directory with yet another folder. The Freedesktop spec has included support for a default cache dir denoted by $XDG_CACHE_HOME typically residing in ~/.cache.

Expected behavior
Not pollute the home directory.

Additional context
This is in regard to the latest release announcement.

https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

$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.

Feature Request Configuration Language Service fixed (release pending)

Most helpful comment

@CameronNemo thank you. I have made sure to upvote the issue and I hope everyone who cares about this issue also upvotes that one. It is quite amazing we have to fight to have the VSCode team (proper) follow a standard that has been in place for far longer than the editor. The issue is currently on the second page, which means slowly but surely we might get it implemented at some point.

All 6 comments

Until we make this change, please note that you can override our defaults by setting the C_Cpp.intelliSenseCachePath User setting to "${XDG_CACHE_HOME}/vscode-cpptools" (or similar)

image

@CameronNemo thank you. I have made sure to upvote the issue and I hope everyone who cares about this issue also upvotes that one. It is quite amazing we have to fight to have the VSCode team (proper) follow a standard that has been in place for far longer than the editor. The issue is currently on the second page, which means slowly but surely we might get it implemented at some point.

Default cache path updated for Mac and Linux in version 0.26.2-insiders, available at https://github.com/microsoft/vscode-cpptools/releases/tag/0.26.2-insiders.

@michelleangela is the default respected or it would need a variable set? because - there is none set usually.

@soloturn, on Linux the C/C++ extension queries XDG_CACHE_HOME and uses whatever value XDG_CACHE_HOME returns, so it should respect the default value unless it has been changed by the user. Also, if querying XDG_CACHE_HOME is not successful on the Linux machine then the extension will fallback to the path ~/.cache.

Was this page helpful?
0 / 5 - 0 ratings