1 .\" Generated with Ronnjs 0.3.8
2 .\" http://github.com/kapouer/ronnjs/
4 .TH "NPM\-CACHE" "1" "June 2014" "" ""
7 \fBnpm-cache\fR \-\- Manipulates packages cache
12 npm cache add <tarball file>
13 npm cache add <folder>
14 npm cache add <tarball url>
15 npm cache add <name>@<version>
17 npm cache clean [<path>]
22 Used to add, list, or clear the npm cache folder\.
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\.
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\.
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\.
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:
49 \|\.\.\./package/package\.json:
50 The package\.json file, as npm sees it\.
53 \|\.\.\./package\.tgz:
54 The tarball for that version\.
59 Additionally, whenever a registry request is made, a \fB\|\.cache\.json\fR file
60 is placed at the corresponding URI, to store the ETag and the requested
61 data\. This is stored in \fB{cache}/{hostname}/{path}/\.cache\.json\fR\|\.
64 Commands that make non\-essential registry requests (such as \fBsearch\fR and \fBview\fR, or the completion scripts) generally specify a minimum timeout\.
65 If the \fB\|\.cache\.json\fR file is younger than the specified timeout, then
66 they do not make an HTTP request to the registry\.
71 Default: \fB~/\.npm\fR on Posix, or \fB%AppData%/npm\-cache\fR on Windows\.
74 The root cache folder\.