Does anyone know how lon…

less than 1 minute read

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


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:

  1. Any file in that project changes
  2. Any file in a dependency of that project changes
  3. Any global dependencies change (package.json, workspace.json, nx.json)
  4. The command options change (i.e. adding –prod)
  5. 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: