Our monorepo has 14 packages and three apps. Builds on every push were taking nine minutes, mostly re-building packages nobody touched.
What actually helped
Remote caching — turned on in project settings, then made sure every task declared its outputs.
Ignored build step — skip a deployment entirely when the app's dependency graph did not change.
Pinning the package manager — a stray lockfile upgrade was invalidating the whole cache.
{
"tasks": {
"build": { "dependsOn": ["^build"], "outputs": [".next/**", "!.next/cache/**", "dist/**"] }
}
}
The biggest single win was declaring outputs correctly. Without it the cache stored nothing useful.