Yes. Imho the How do I use MSYS2? has a quite detailed example on installing and caching on Windows.
BTW: If you plan to publish to Github (releases or pages) I recommened installing MSYS2 like described, because rsync of the default env fails - see my post Gh-pages with NodeJS / Electron build