For zigclc I cache the parsed results of running zig build --help, so I can more quickly present the completions for build steps, system integrations and project options, as they all depend on build.zig and I don’t want to run zig build --help every time you press TAB.
Originally I put the parsed info in a file .zig_build.txt (next to build.zig/build.zig.zon), but since I need to cache some more stuff in different files I now store this in a .zigclc subdirectory. Both these solution have the same problem: you need to add them to your VCS’ ignore file (.hgignore, .gitignore, .csvignore, …) otherwise your VCS will nag you about them when you query its status (to be clear: you shouldn’t put that cached information in your VCS).
I expect that most developers already have .zig-cache in their ignore file, and if I would just add a subdirectory .zig-cache/zigclc under that, and store my stuff there, users would not have to add another file/directory to their ignore file.
Is it acceptable to create subdirectories in .zig-cache? Is there some information on what goes in which directories under .zig-cache? It seems to have c, h, o, tmp, and z (sometimes a few more) but it is not clear what not to use (e.g. no single character directory names)? I don’t want to add a directory there and then find out that it breaks compilation of some projects, or gets in the way of future extensions.