The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / deps / npm / man / man1 / cache.1 @ d46ebffb

History | View | Annotate | Download (2.25 KB)

1
.\" Generated with Ronnjs 0.3.8
2
.\" http://github.com/kapouer/ronnjs/
3
.
4
.TH "NPM\-CACHE" "1" "April 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 \fB$HOME/\.npm\fR\|\.  For each package that is added
45
to the cache, three pieces of information are stored in \fB{cache}/{name}/{version}\fR:
46
.
47
.IP "\(bu" 4
48
\|\.\.\./package/:
49
A folder containing the package contents as they appear in the tarball\.
50
.
51
.IP "\(bu" 4
52
\|\.\.\./package\.json:
53
The package\.json file, as npm sees it, with overlays applied and a _id attribute\.
54
.
55
.IP "\(bu" 4
56
\|\.\.\./package\.tgz:
57
The tarball for that version\.
58
.
59
.IP "" 0
60
.
61
.P
62
Additionally, whenever a registry request is made, a \fB\|\.cache\.json\fR file
63
is placed at the corresponding URI, to store the ETag and the requested
64
data\.
65
.
66
.P
67
Commands that make non\-essential registry requests (such as \fBsearch\fR and \fBview\fR, or the completion scripts) generally specify a minimum timeout\.
68
If the \fB\|\.cache\.json\fR file is younger than the specified timeout, then
69
they do not make an HTTP request to the registry\.
70
.
71
.SH "CONFIGURATION"
72
.
73
.SS "cache"
74
Default: \fB$HOME/\.npm\fR on Posix, or \fB$HOME/npm\-cache\fR on Windows\.
75
.
76
.P
77
The root cache folder\.
78
.
79
.SH "SEE ALSO"
80
.
81
.IP "\(bu" 4
82
npm help folders
83
.
84
.IP "\(bu" 4
85
npm help config
86
.
87
.IP "\(bu" 4
88
npm help install
89
.
90
.IP "\(bu" 4
91
npm help publish
92
.
93
.IP "\(bu" 4
94
npm help pack
95
.
96
.IP "" 0
97