14495e50ae0d4ad743791c94a37884167c24e8da
[platform/upstream/nodejs.git] / deps / npm / man / man1 / npm-cache.1
1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
3 .
4 .TH "NPM\-CACHE" "1" "November 2013" "" ""
5 .
6 .SH "NAME"
7 \fBnpm-cache\fR \-\- Manipulates packages cache
8 .
9 .SH "SYNOPSIS"
10 .
11 .nf
12 npm cache add <tarball file>
13 npm cache add <folder>
14 npm cache add <tarball url>
15 npm cache add <name>@<version>
16 npm cache ls [<path>]
17 npm cache clean [<path>]
18 .
19 .fi
20 .
21 .SH "DESCRIPTION"
22 Used to add, list, or clear the npm cache folder\.
23 .
24 .IP "\(bu" 4
25 add:
26 Add the specified package to the local cache\.  This command is primarily
27 intended to be used internally by npm, but it can provide a way to
28 add data to the local installation cache explicitly\.
29 .
30 .IP "\(bu" 4
31 ls:
32 Show the data in the cache\.  Argument is a path to show in the cache
33 folder\.  Works a bit like the \fBfind\fR program, but limited by the \fBdepth\fR config\.
34 .
35 .IP "\(bu" 4
36 clean:
37 Delete data out of the cache folder\.  If an argument is provided, then
38 it specifies a subpath to delete\.  If no argument is provided, then
39 the entire cache is cleared\.
40 .
41 .IP "" 0
42 .
43 .SH "DETAILS"
44 npm stores cache data in the directory specified in \fBnpm config get cache\fR\|\.
45 For each package that is added to the cache, three pieces of information are
46 stored in \fB{cache}/{name}/{version}\fR:
47 .
48 .IP "\(bu" 4
49 \|\.\.\./package/:
50 A folder containing the package contents as they appear in the tarball\.
51 .
52 .IP "\(bu" 4
53 \|\.\.\./package\.json:
54 The package\.json file, as npm sees it, with overlays applied and a _id attribute\.
55 .
56 .IP "\(bu" 4
57 \|\.\.\./package\.tgz:
58 The tarball for that version\.
59 .
60 .IP "" 0
61 .
62 .P
63 Additionally, whenever a registry request is made, a \fB\|\.cache\.json\fR file
64 is placed at the corresponding URI, to store the ETag and the requested
65 data\.
66 .
67 .P
68 Commands that make non\-essential registry requests (such as \fBsearch\fR and \fBview\fR, or the completion scripts) generally specify a minimum timeout\.
69 If the \fB\|\.cache\.json\fR file is younger than the specified timeout, then
70 they do not make an HTTP request to the registry\.
71 .
72 .SH "CONFIGURATION"
73 .
74 .SS "cache"
75 Default: \fB~/\.npm\fR on Posix, or \fB%AppData%/npm\-cache\fR on Windows\.
76 .
77 .P
78 The root cache folder\.
79 .
80 .SH "SEE ALSO"
81 .
82 .IP "\(bu" 4
83 npm help  folders
84 .
85 .IP "\(bu" 4
86 npm help config
87 .
88 .IP "\(bu" 4
89 npm help  config
90 .
91 .IP "\(bu" 4
92 npm help  npmrc
93 .
94 .IP "\(bu" 4
95 npm help install
96 .
97 .IP "\(bu" 4
98 npm help publish
99 .
100 .IP "\(bu" 4
101 npm help pack
102 .
103 .IP "" 0
104