Skip to main content
Angular CLI - ng cache Command

Angular CLI - ng cache Command

Configure or inspect the persistent Angular CLI disk cache.

Angular CLI - ng cache Command illustration

How it works

ng cache controls the persistent disk cache used to speed up CLI operations. Workspace settings live under cli.cache in angular.json. Use cache statistics to understand reuse, and clear or disable the cache only when investigating cache-related build issues.

Good practice

  • Check the local Angular CLI version and run commands from the intended workspace.
  • Review angular.json targets and builders before assuming optional commands are configured.
  • Use the package manager and lockfile selected by the project.
  • Review generated files, configuration changes, and build output before committing or deploying.

Further reading: Tutorialspoint: Angular CLI - ng cache Command · Current Angular CLI reference · Workspace configuration.