-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcache.json
54 lines (54 loc) · 3.1 KB
/
cache.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"name": "cache",
"command": "ng cache",
"shortDescription": "Configure persistent disk cache and retrieve cache statistics.",
"longDescriptionRelativePath": "@angular/cli/src/commands/cache/long-description.md",
"longDescription": "Angular CLI saves a number of cachable operations on disk by default.\n\nWhen you re-run the same build, the build system restores the state of the previous build and re-uses previously performed operations, which decreases the time taken to build and test your applications and libraries.\n\nTo amend the default cache settings, add the `cli.cache` object to your [Workspace Configuration](reference/configs/workspace-config).\nThe object goes under `cli.cache` at the top level of the file, outside the `projects` sections.\n\n```jsonc\n{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"cli\": {\n \"cache\": {\n // ...\n },\n },\n \"projects\": {},\n}\n```\n\nFor more information, see [cache options](reference/configs/workspace-config#cache-options).\n\n### Cache environments\n\nBy default, disk cache is only enabled for local environments. The value of environment can be one of the following:\n\n- `all` - allows disk cache on all machines.\n- `local` - allows disk cache only on development machines.\n- `ci` - allows disk cache only on continuous integration (CI) systems.\n\nTo change the environment setting to `all`, run the following command:\n\n```bash\nng config cli.cache.environment all\n```\n\nFor more information, see `environment` in [cache options](reference/configs/workspace-config#cache-options).\n\n<div class=\"alert is-helpful\">\n\nThe Angular CLI checks for the presence and value of the `CI` environment variable to determine in which environment it is running.\n\n</div>\n\n### Cache path\n\nBy default, `.angular/cache` is used as a base directory to store cache results.\n\nTo change this path to `.cache/ng`, run the following command:\n\n```bash\nng config cli.cache.path \".cache/ng\"\n```\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
}
],
"subcommands": [
{
"name": "clean",
"command": "clean",
"shortDescription": "Deletes persistent disk cache from disk.",
"options": [],
"aliases": [],
"deprecated": false
},
{
"name": "disable",
"command": "disable",
"shortDescription": "Disables persistent disk cache for all projects in the workspace.",
"options": [],
"aliases": [
"off"
],
"deprecated": false
},
{
"name": "enable",
"command": "enable",
"shortDescription": "Enables disk cache for all projects in the workspace.",
"options": [],
"aliases": [
"on"
],
"deprecated": false
},
{
"name": "info",
"command": "info",
"shortDescription": "Prints persistent disk cache configuration and statistics in the console.",
"options": [],
"aliases": [],
"deprecated": false
}
]
}