Skip to content
Back to Knowledge Base

Ultracache and Nx versions

Ultracache is supported on Nx 24.0.0 and later. On those versions, CI runs use it by default once Ultracache is on for your workspace in Nx Cloud.

NX_CLOUD_USE_ULTRACACHE changes the default for a run, and Nx 23 can opt in with it:

Nx versionIn CI, unsetNX_CLOUD_USE_ULTRACACHE=trueNX_CLOUD_USE_ULTRACACHE=false
24.0.0 and laterOnOnOff
23.xOffOnOff
Before 23.0.0OffThe run failsOff

Outside CI, every version hashes from declared inputs unless the run sets NX_CLOUD_USE_ULTRACACHE to true. If the workspace's Ultracache setting is off, every run hashes from declared inputs, whatever the variable says.

Set the variable in your CI environment:

.github/workflows/ci.yml
env:
NX_CLOUD_USE_ULTRACACHE: 'true'

With the variable set to true, a run fails if Nx Cloud can't return the task's recording or a recording report is incomplete. Without it, Nx makes one attempt to read the recordings, waits up to 10 seconds, and falls back to declared inputs if the read fails.

Set NX_CLOUD_USE_ULTRACACHE to false to hash every task in that run from its declared inputs. To turn Ultracache off for a single target instead, set ultracache.mode to off.

Last updated: