I'm working on a mono repo project (with multi language support) and we have large cache built over time ~2GB. The cache download usually takes about 2 minute and saving the cache in post action takes about 5 minutes. The build without cache usually run about 17 minutes and with cache about 7 minutes (if there are any source changes in java project).
So with cache enabled the total build takes about 14minutes and we are wondering if we can remove the post action (to save cache) in PR branches and keep it only in main branch, so that we can save additional 5 minutes on most of the PR builds.
Is there an existing option to do this? If not, is it something worth considering?