1 .TH "NPM\-CACHE" "1" "October 2016" "" ""
3 \fBnpm-cache\fR \- Manipulates packages cache
8 npm cache add <tarball file>
10 npm cache add <tarball url>
11 npm cache add <name>@<version>
15 npm cache clean [<path>]
20 Used to add, list, or clear the npm cache folder\.
24 Add the specified package to the local cache\. This command is primarily
25 intended to be used internally by npm, but it can provide a way to
26 add data to the local installation cache explicitly\.
29 Show the data in the cache\. Argument is a path to show in the cache
30 folder\. Works a bit like the \fBfind\fP program, but limited by the
34 Delete data out of the cache folder\. If an argument is provided, then
35 it specifies a subpath to delete\. If no argument is provided, then
36 the entire cache is cleared\.
41 npm stores cache data in the directory specified in \fBnpm config get cache\fP\|\.
42 For each package that is added to the cache, three pieces of information are
43 stored in \fB{cache}/{name}/{version}\fP:
46 \|\.\.\./package/package\.json:
47 The package\.json file, as npm sees it\.
49 \|\.\.\./package\.tgz:
50 The tarball for that version\.
54 Additionally, whenever a registry request is made, a \fB\|\.cache\.json\fP file
55 is placed at the corresponding URI, to store the ETag and the requested
56 data\. This is stored in \fB{cache}/{hostname}/{path}/\.cache\.json\fP\|\.
58 Commands that make non\-essential registry requests (such as \fBsearch\fP and
59 \fBview\fP, or the completion scripts) generally specify a minimum timeout\.
60 If the \fB\|\.cache\.json\fP file is younger than the specified timeout, then
61 they do not make an HTTP request to the registry\.
65 Default: \fB~/\.npm\fP on Posix, or \fB%AppData%/npm\-cache\fP on Windows\.
67 The root cache folder\.