.vscode caching too much data since update
I have noticed since the recent update that cpptools seems to be caching a lot of data (~1GB for a small project). This seems to be in an ".vscode/ipch" subdirectory.

@bobbrow I guess I wasn't clear in what I was asking. I don't want the cache to be eliminated, I simply want the ability to clear it at some point prior to preparing the zip file. But, if it's being stored outside the workspace, I guess that solves my problem.
Joining this discussion a bit late... I appreciate that there is a proposal to change this behaviour. I think that %LOCALAPPDATA% is the right choice on Windows, whereas %USERPROFILE% is NOT (I don't know why many programs write data there, it's not supposed to be used that way). For Linux, I'd strongly support using $XDG_CACHE_HOME, as for example here we have a setup with home directories on NFS (with disk quotas—it's a setup used by University students) and we regularly have issues with ipch folders causing users to exceed their disk quotas ($XDG_CACHE_HOME is set to use the local hard drive). I don't know what the best practice on MacOS would be.
As to whether put it in a Microsoft folder under %LOCALAPPDATA%, I don't have a preference. Maybe it could be a VSCode folder in %LOCALAPPDATA, that all VS Code components writing cache data should use...
And just to give another reason why I find that solving this issue is important: yesterday I double-clicked a .cpp file I wanted to edit (having .cpp files associated with VS Code), while I was using VS Code to edit a web site (therefore the root of the site was open as workspace). I later noticed a very big .vscode folder on the root of the web site! I'd call this behaviour "user data pollution"...
We also had students compressing their project folders, and handing in ZIP files for assignments what ere several dozens of MB instead of a few kB...
I don't know what the best practice on MacOS would be.
I believe you would ideally use URLsForDirectory:inDomain with NSCachesDirectory and NSUserDomainMask but it might be possible to just use $HOME/Library/Caches. In either case, append the VS Code bundle identifier as a subdirectory name.
@hb9tst I created a new issue to track the $XDG_CACHE_HOME at https://github.com/microsoft/vscode-cpptools/issues/3860
I appreciate how well the maintainers handled this issue. There were a lot of people frustrated about this, but you managed to find a solution that took a good middle ground. Thanks!
For now, I just simply move the directory to a large drive and symlink it.
What about changing the default maximum cash to a reasonable amount: 100 MB and inform the user if more space is needed? What about purging some of the old cashed data?
I think that simply respecting the standard locations for cache data in each supported OS is the way to go. I say that as a sysadmin (although I'm also a developer using VS Code), because I have a lot of problems with students getting over disk quota in their homes due to VS Code cached data. Of course, they aren't aware at all of it. They are not professional developers, nor they have an in-depth knowledge of the problem. So if VS Code would ask them "can I put more data?" they would probably just click OK.
@hb9tst We've already switched to using a shared location for the IntelliSense cache data at "standard locations". Is there still an issue with our caching behavior?
Can I safely remove subfolders of vscode-cpptools\ipch? Or should I do it by limiting the cache size?
@lostmsu Ideally you should set your intelliSenseCacheSize to 0, which should cause it to be removed. If you try to remove it manually, that is "safe", but it might be in-use by a cpptools-srv process, and/or a cpptools-srv process might just recreate it.
@sean-mcmanus I am talking about individual folders, not the entire cache dir.
Yeah, you can safely remove subfolders. If the cache is in use and you can't delete it, you can close VS Code and then delete the subfolders. A missing cache will just cause it to be regenerated again if it's needed later.