1 npm-cache(1) -- Manipulates packages cache
2 ==========================================
6 npm cache add <tarball file>
8 npm cache add <tarball url>
9 npm cache add <name>@<version>
13 npm cache clean [<path>]
17 Used to add, list, or clear the npm cache folder.
20 Add the specified package to the local cache. This command is primarily
21 intended to be used internally by npm, but it can provide a way to
22 add data to the local installation cache explicitly.
25 Show the data in the cache. Argument is a path to show in the cache
26 folder. Works a bit like the `find` program, but limited by the
30 Delete data out of the cache folder. If an argument is provided, then
31 it specifies a subpath to delete. If no argument is provided, then
32 the entire cache is cleared.
36 npm stores cache data in the directory specified in `npm config get cache`.
37 For each package that is added to the cache, three pieces of information are
38 stored in `{cache}/{name}/{version}`:
40 * .../package/package.json:
41 The package.json file, as npm sees it.
43 The tarball for that version.
45 Additionally, whenever a registry request is made, a `.cache.json` file
46 is placed at the corresponding URI, to store the ETag and the requested
47 data. This is stored in `{cache}/{hostname}/{path}/.cache.json`.
49 Commands that make non-essential registry requests (such as `search` and
50 `view`, or the completion scripts) generally specify a minimum timeout.
51 If the `.cache.json` file is younger than the specified timeout, then
52 they do not make an HTTP request to the registry.
58 Default: `~/.npm` on Posix, or `%AppData%/npm-cache` on Windows.
60 The root cache folder.