nx/docs/shared/deprecated/runtime-cache-inputs.md
Isaac Mann aedea54624
chore(nx-dev): check for broken anchor links (#23580)
Checks for broken anchor links, except for links that go to `/nx-api` or
`/blog`
Fixes existing broken anchor links
2024-05-21 09:31:37 -04:00

35 lines
921 B
Markdown

# runtimeCacheInputs
The `runtimeCacheInputs` property was used as a way to add extra inputs to the Nx cache, like the version of node on that particular machine.
`runtimeCacheInputs` were set as follows:
```json
{
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"runtimeCacheInputs": ["node -v"]
}
}
}
}
```
Instead of specifying the runtime inputs in `tasksRunnerOptions`, in Nx 14.4 you can include them as runtime inputs in the standard [`inputs` and `namedInputs` area of your project configuration](/reference/project-configuration#inputs-and-named-inputs) or [`nx.json`](/reference/nx-json#inputs-namedinputs).
The new style looks like this:
```jsonc
{
"targets": {
"build": {
"inputs": ["^build", { "runtime": "node -v" }]
// ...
}
}
}
```