title: Does npm cache packages?
body: <p>In my server, npm doesn't cache any package and cache directory is empty.</p>
  
  <pre><code>#www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ nvm current
  v9.4.0
  # www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ npm config get cache
  /home/www/.npm
  # www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ ls
  anonymous-cli-metrics.json  _cacache  _locks
  </code></pre>
  
  <p>My npm config</p>
  
  <pre><code>www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ npm config ls
  ; cli configs
  metrics-registry = "https://registry.npmjs.org/"
  scope = ""
  user-agent = "npm/5.6.0 node/v9.4.0 linux x64"
  
  ; node bin location = /home/www/.nvm/versions/node/v9.4.0/bin/node
  ; cwd = /home/www/.npm
  ; HOME = /home/www
  ; "npm config ls -l" to show all defaults.
  </code></pre>
  
  <p>=====<strong>update</strong></p>
  
  <p>I found that after node@5.0 npm stores cache data in an opaque directory within the configured cache, named _cacache.<a href="https://docs.npmjs.com/cli/cache" rel="noreferrer">https://docs.npmjs.com/cli/cache</a></p>
  
  <pre><code>www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ du -h --max-depth=1
  56M ./_cacache
  4.0K    ./_locks
  8.0K    ./node-sass
  56M .
  </code></pre>
  
  <p>The _cacache directory is just 56MB</p>
  
  <pre><code>www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ npm cache verify
  Cache verified and compressed (~/.npm/_cacache):
  Content verified: 1164 (39196729 bytes)
  Index entries: 1167
  Finished in 1.321s
  </code></pre>
  
  <p>====<strong>update</strong></p>
  
  <p>Another test in my project.
  After run <code>rm -rf node_modules &amp;&amp; npm clean cache --force</code>, then <code>run npm install</code> added 1551 packages in 171.389s. And then <code>rm -rf node_modules &amp;&amp; npm install</code> added 1551 packages in 152.378s. Does npm really use cache?</p>