ng Verified current stable Not installed? Programming

Ng / Disable Persistent Disk Cache Workspace

Disable Persistent Disk Cache Workspace

Disables the persistent disk cache in the current workspace.

$
Terminal
ng cache off

When To Use

During troubleshooting when caching mechanisms cause build issues or speed concerns.

Pro Tip

Be cautious of performance trade-offs; disabling cache may significantly increase build times.

Anatomy of Output

Understanding the result

Cache disabled Status

Confirms that the cache has been successfully turned off.

Cache size: N/A Cache Size

Reports that no cache will be maintained while disabled.

Operation completed in 100ms Duration

Time taken for the operation.

Power User Variants

Optimized versions

ng cache disable --force

Forcefully disables caching regardless of current state.

ng cache disable --quiet

Disables caching without verbose output.

Troubleshooting

Common pitfalls

Error: Cache already disabled

Solution: Check the current status before toggling cache.

Permission denied when disabling cache

Solution: Run the command with appropriate user permissions.

Caching settings not found

Solution: Ensure Angular CLI is correctly configured.

Command Breakdown

What each part is doing

ng
Base Command
The executable that performs this operation. Here it runs Ng before the shell applies any redirect operators.
off
off|disable
The value supplied for off|disable.

Alternative Approaches

Comparable commands in other tools

Alternative programming tools for the same job.