Free tools Windows power users keep installed
One-click scans. No signup required.
Angular CLI’s ng cache command manages persistent disk caching for workspace projects. It can show cache details, delete stored cache data, or turn caching on and off. Cache settings—including whether it applies locally or in CI and where files are stored—are configured in the workspace’s top-level cli.cache section of angular.json.
What does Angular’s ng cache do?
Angular CLI stores eligible operations on disk so it can reuse work on a later run. Angular says that rerunning the same build can restore the previous build state and reuse previously performed operations, reducing build and test time. The documentation does not quantify that reduction, so the benefit depends on the work being cached and the project.
As an Amazon Associate I earn from qualifying purchases.
The cache is persistent between runs, unlike temporary in-memory state. Its documented default location is .angular/cache in the workspace.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →What are the ng cache subcommands?
| Command | What it does |
|---|---|
ng cache info |
Prints cache configuration and statistics in the console. Angular CLI reference. |
ng cache clean |
Deletes persistent cache data from disk. Angular CLI reference. |
ng cache enable or ng cache on |
Enables persistent disk caching for all projects in the workspace. Angular CLI reference. |
ng cache disable or ng cache off |
Disables persistent disk caching for all projects in the workspace. Angular CLI reference. |
These operations are different: info inspects settings and statistics, clean removes stored data, and enable/disable change whether caching is used. Cleaning the cache is not documented as a universal fix for build failures.
#1 Best Overall
How do you check or clear the Angular cache?
Inspect the current cache
- Open a terminal in the Angular workspace.
- Run
ng cache infoto print its configuration and statistics.
Delete persistent cache data
- Open a terminal in the Angular workspace.
- Run
ng cache clean. The command deletes the persistent disk cache; Angular’s command reference does not say that it removes other workspace files.
How do you enable Angular caching in CI?
The cache environment setting accepts local, ci, or all. Angular CLI uses the presence and value of the CI environment variable to determine the environment in which it is running. To include CI systems, set the environment to ci or all in workspace configuration. To apply caching on all machines, Angular also documents this command:
ng config cli.cache.environment all
For example, the top-level workspace configuration can be set as follows:
Rank #2
{
"cli": {
"cache": {
"enabled": true,
"environment": "ci",
"path": ".angular/cache"
}
}
}
Use "environment": "all" instead of "ci" if the cache should apply on both development machines and CI systems. The setting belongs in the top-level cli.cache object in angular.json, outside the projects section. See Angular’s workspace configuration reference and cache overview.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →How do you change the cache location or default?
Angular documents these workspace defaults: caching enabled, environment set to local, and cache path set to .angular/cache. Change them under cli.cache in angular.json. For example, Angular shows this command for changing the path:
Rank #3
ng config cli.cache.path ".cache/ng"
This changes the configured cache directory; it is not a command to delete cache files. Set enabled to false in the workspace configuration to disable caching by default, or use ng cache disable to disable it for all workspace projects.
Why keep caching enabled for development?
Angular’s ng serve reference says development-server prebundling requires Angular CLI caching to be enabled. If you turn caching off, that documented prebundling requirement will no longer be met. See the Angular CLI ng serve reference.
Rank #4
Which cache setting should you choose?
| Setting | Effect | Documented default |
|---|---|---|
enabled |
Whether persistent disk caching is enabled. | true |
environment |
local applies on development machines; ci applies on continuous integration systems; all applies on all machines. |
local |
path |
Directory used to store the cache. | .angular/cache |
These are the documented Angular workspace defaults; behavior and available options may vary in other Angular CLI releases. The official references cited here do not identify a release number.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




