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

Cache files not stored under appropriate XDG directory #126182

Open
dbready opened this issue Jun 13, 2021 · 6 comments
Open

Cache files not stored under appropriate XDG directory #126182

dbready opened this issue Jun 13, 2021 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron linux Issues with VS Code on Linux upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@dbready
Copy link

dbready commented Jun 13, 2021

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.57.0
  • OS Version: Ubuntu 20.04.2 LTS

VSCode appears to store cache/intermediate files under ~/.config/Code. For example: Cache/, CachedConfigurations/, CachedData/, CachedExtensions/, CachedExtensionsVSIXs/, Code Cache/, GPUCache/, etc. There may be other files/folders containing temporary data that is also inappropriate for the ~/.config location.

On a well used Ubuntu system, my total ~/.config/ is 657 MB, the ~/.config/Code directory is 606 MB, and the sum of all .config/Code/ directories starting with “Cache” is 568 MB. While it is possible that the “Cache” naming is a red herring, I believe they should be stored under ~/.cache, as per the XDG specification.

Only noticed this because I am trying to become more diligent about backups, and the total size of my ~/.config was surprising.

@bpasero bpasero assigned deepak1556 and unassigned bpasero Jun 14, 2021
@bpasero bpasero added electron Issues and items related to Electron upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Jun 14, 2021
@awilkins
Copy link
Contributor

awilkins commented Aug 30, 2021

Likewise, only my .config/Code folder is 2.9GB and I'm fairly certain the only thing in there I'd want to back up is my settings.json file and maybe some snippets.

(although by far the worst culprit is Unity3d, Slack also does this).

@elder-n00b
Copy link

Related: #3884
Apparently this "feature" is inherited by VSCode and VSCodium from Chromium/Electron, though I see that on MacOS VSCode appropriately puts some caches under ~/Library/Caches/com.Microsoft.VSCode (and com.Microsoft.VSCode.ShipIt) and the rest under ~/Library/Application Support/Code (?).
Some suggest to symlink them out of the way, I have not tried yet.

@juvtib
Copy link

juvtib commented Aug 8, 2022

I'm having the same issue. I am backing up ~/.config. And I see ~/.config/Code/CachedData show in my backup logs. It looks like these files should be moved to ~/.cache.

@deepak1556
Copy link
Contributor

Upstream issue electron/electron#8124

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug linux Issues with VS Code on Linux upstream-issue-linked This is an upstream issue that has been reported upstream labels Dec 8, 2022
@juvtib
Copy link

juvtib commented Dec 8, 2022

Thanks for this link. Looking upstream, I was a bit disappointed to see a comment war about what is cache and what is config.

I'd still like to see cache in the cache directory and configurations in the config directory. This follows the common meaning of cache and config. And it will solve the backup and replication issues reported over the years.

@metov
Copy link

metov commented Dec 27, 2022

This is the same as #3884, isn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug electron Issues and items related to Electron linux Issues with VS Code on Linux upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

7 participants