diff --git a/docs/shared/deprecated/legacy-cache.md b/docs/shared/deprecated/legacy-cache.md index 5ff3410c15439..e25c158e33a8a 100644 --- a/docs/shared/deprecated/legacy-cache.md +++ b/docs/shared/deprecated/legacy-cache.md @@ -1,6 +1,6 @@ # Legacy Cache -In Nx 20, the local cache metadata and project graph are stored in a database, rather than using the file system. (Cache artifacts are still stored on the file system.) In Nx 21 the legacy file system cache will be removed and the database cache will be the only option. The database cache has two benefits: +In Nx 20, the local cache metadata are stored in a database, rather than using the file system. (Cache artifacts are still stored on the file system.) In Nx 21 the legacy file system cache will be removed and the database cache will be the only option. The database cache has two benefits: 1. Cache reads and writes are faster. 2. The local cache is more secure since other processes with access to the file system can no longer read or modify the cache. diff --git a/docs/shared/guides/unknown-local-cache.md b/docs/shared/guides/unknown-local-cache.md index bd98b0dd3be56..d7d7ca715cfca 100644 --- a/docs/shared/guides/unknown-local-cache.md +++ b/docs/shared/guides/unknown-local-cache.md @@ -44,6 +44,11 @@ error. ## You Share Cache with Another Machine Using a Network Drive +When using the legacy file system cache ([deprecated in Nx 20](/deprecated/legacy-cache)), you can prefix any Nx command with `NX_REJECT_UNKNOWN_LOCAL_CACHE=0` to ignore the errors ( +e.g., `NX_REJECT_UNKNOWN_LOCAL_CACHE=0 nx run-many -t build test`). This is similar to +setting `NODE_TLS_REJECT_UNAUTHORIZED=0` to ignore any errors stemming form self-signed certificates. Even though it +will make it work, this approach is discouraged. + Storing Nx's local cache on a network drive presents security risks, so we prevent you from doing so. When a network drive is shared, every CI run has access to all the previously created Nx cache artifacts. Hence, it is plausible for every single artifact - for every single task hash - to be accessed without leaving any trace. This is possible due to the network drive's capability to allow overwrites.