Does anyone know how lon…
Does anyone know how long local caches are available for? I’m sure that I was building a project yesterday, and the next day after changing one file, he was rebuilding the entire application anew, but he should only rebuild 2 libraries
Responses:
from my understanding the cache is project based, not file based so if you change one file in a lib that affects that app it will have to rebuild.
I was changing file in one lib, but I also have more 70 libs and all of them were rebuilding
but others libs weren’t affected
nx affected:lib showed only 1 and nx affected:apps showed only 1
Could you relate to the topic ??
The cache for a particular project should be invalidated if:
- Any file in that project changes
- Any file in a dependency of that project changes
- Any global dependencies change (package.json, workspace.json, nx.json)
- The command options change (i.e. adding –prod)
- Relevant environment variables change If none of these things happened and the cache is still being skipped, please file an issue
This page explains more: https://nx.dev/angular/guides/computation-caching