index.js
function getCache (pkg, config) {
  pkg = toPkg(pkg)

  if(config && config.cacheHash)
    return path.join(config.cache, pkg.shasum, 'package.tgz')

  return path.join(
    config.cache || path.join(process.env.HOME, '.npm'),
    pkg.name, pkg.version, 'package.tgz'
  )
}
function getCache (pkg, config) {
  pkg = toPkg(pkg)

  if(config && config.cacheHash)
    return path.join(config.cache, pkg.shasum, 'package.tgz')

  return path.join(
    config.cache || path.join(process.env.HOME, '.npm'),
    pkg.name, pkg.version, 'package.tgz'
  )
}
function getCache ( pkg , config ) { pkg = toPkg ( pkg ) if ( config && config . cacheHash ) return path . join ( config . cache , pkg . shasum , 'package.tgz' ) return path . join ( config . cache || path . join ( process . env . HOME , '.npm' ) , pkg . name , pkg . version , 'package.tgz' ) }
Would be better to store the tarball as it's hash, not it's version. that would allow exact shrinkwraps. Probably want to fallback to getting the other cache, for speed. But to pull down new deps... Also... hashes would allow peer to peer module hosting, and multiple repos...
Would be better to store the tarball as it s hash not it s version . that would allow exact shrinkwraps . Probably want to fallback to getting the other cache for speed . But to pull down new deps ... Also ... hashes would allow peer to peer module hosting and multiple repos ...