If stashed was to learn how to cache with #import and if pch is used then I suppose the easiest a workaround is to put the #import directives in the StdAfx.h and the other files could simply include the generated tlh files instead of using #import.
Since the pch has to be compiled before everything else, even when compiling in parallel, the tlh and tli files will be generated once only and can be used by the other compile units.
I just installed stashed.io and it work possible because of my compiler flags. Here is the command I am using
cl file.cpp /MP /GS /TP /analyze- /W3 /Zc:wchar_t /I"Z:\F\dev\include" /I"C:\dev\vcpkg\installed\x86-windows\include" /Gm- /Od /Ob0 /Fd"proxy.dir\Debug\proxy.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE=1" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MD /std:c++17 /FC /Fa"Debug/" /EHsc /nologo /Fo"proxy.dir\Debug\" /Fp"proxy.dir\Debug\proxy.pch" /diagnostics:classic
I got it to work with a following the example in the docs i.e. cl /c /Yc a.cpp
In Logs, I get this Error: 2019/02/17 13:23:51.054 ERROR
Disable(): Object {reason: "msvs:v2017:211b1ebd:14.16.27023:x86_x64:remove d:\programs\microsoft visual studio\2017\community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe: Access is denied."}
reason: "msvs:v2017:211b1ebd:14.16.27023:x86_x64:remove d:\programs\microsoft visual studio\2017\community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe: Access is denied."