Windows has a limitation of 8K characters for commands. Since compilation flags for large projects might exceed this limit (e.g. it has many include paths), @file.opt is commonly used. The problem is that ccache expands @file and executes the preprocessor with raw arguments. This fails for very long commands...
Thanks for the bug report. ccache needs to expand the file because it potentially needs to remove or rewrite arguments in the file, but ccache could very well construct a new temporary argument file on Windows when the command line size is larger than some threshold.
Moved to https://github.com/ccache/ccache/issues/95.