-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Use XDG_CACHE_HOME on Linux systems for the default databaseFilename #10191
Comments
Yes, the normal behavior, which I repro, is for the database files to be written to the .cache location -- see the previously fixed bug at #3979 . i.e. something unexpected is happening for you -- do you have any idea why we may not be using your XDG_CACHE_DIR? We could also review that for possible causes. Are those old files from an older version of our extension? Do you have the C_Cpp.default.browse.databaseFilename set? |
I have not configured I do also have ipch cache files in I have many of these files and they have been created recently. I am running vscode-cpptools
|
Ah, okay, you're right, I was mistaken. The database still defaults to the .config location (the referenced issue was for the IntelliSense cache files). |
This issue was previously tracked by #1404, but it got closed due to not having enough up votes, although having a setting and changing the default are slightly different requests. A potential workaround is to use |
I don't understand the workaround. This makes vscode write all personalized things somewhere else, yes? I wish to separate the cache from the config, since the cache is large and config is small, and I want to retain a backup of the config. If I include the caches in my backup it bloats the backups and causes differential churn in them unnecessarily, which is a problem for quick backups on low bandwidth connections and ultimately consumes more disk space in the backup than needed. |
@pwaller Yes, if you use the --user-data-dir then it won't write the files to the XDG_CONFIG_HOME. |
There's a follow up issue at #11696 |
Environment
Bug Summary and Steps to Reproduce
I hack on a number of large C/C++ projects including the linux kernel and llvm-project.
What I see is that my
$HOME/.config
directory contains many large binaries (tens of gigabytes, individual files >2.5GiB each), where I would rather it did not. These are the.config/Code/User/workspaceStorage/<randomhex>/ms-vscode.cpptools/.browse.VC.db
files.I consider
XDG_CONFIG_HOME
is meant to be the place I can store configuration I intend version control and to backup, but I can't easily do this if it contains a lot of large binaries.I expected these large binaries to live in
XDG_CACHE_HOME
, which is where I go to delete things if I'm running out of disk space, the place where things should live which can be recomputed.As an additional note, I see multiple
<randomhex>
directories where theworkspace.json
indicates that these several caches of the large caches belong to the same workspace-on-disk, so there is some unexpected duplication going on as well. Theworkspace.json
is identical. I presume these are outdated and unused, and I would naturally clear them out by blatting my$XDG_CACHE_HOME
directory, not something I intend to do with my$XDG_CONFIG_HOME
.Expected behavior
I think that large recomputable binary databases should be stored in
$XDG_CACHE_DIR/vscode-cpptools
alongside the existing ipch cache.Code sample and Logs
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: