请问故宫缓存包?
在我的服务器,NPM不缓存任何包装和缓存目录为空。
#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
我NPM配置
www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ npm config ls
; cli configs
metrics-registry = "/"
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.
=====更新
我发现后[email protected] NPM专卖店在一个不透明的目录中配置缓存内缓存数据,命名_cacache.
www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ du -h --max-depth=1
56M ./_cacache
4.0K ./_locks
8.0K ./node-sass
56M .
该_cacache目录仅仅是56MB
www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ npm cache verify
Cache verified and compressed (~/.npm/_cacache):
Content verified: 1164 (39196729 bytes)
Index entries: 1167
Finished in 1.321s
====更新
在我的项目的另一个测试。运行rm -rf node_modules && npm clean cache --force
后,再run npm install
在171.389s增加1551包。然后rm -rf node_modules && npm install
在152.378s增加1551包。难道真的NPM使用缓存?
全球包缓存默认情况下使用。你应该注意到在你安装时刻的差,如果你第一次做一个“故宫缓存清理”。这将清理什么不是全局安装,对于那些你必须明确地做一个“故宫卸载”
请问故宫缓存包?
在我的服务器,NPM不缓存任何包装和缓存目录为空。
#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
我NPM配置
www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ npm config ls
; cli configs
metrics-registry = "/"
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.
=====更新
我发现后[email protected] NPM专卖店在一个不透明的目录中配置缓存内缓存数据,命名_cacache.
www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ du -h --max-depth=1
56M ./_cacache
4.0K ./_locks
8.0K ./node-sass
56M .
该_cacache目录仅仅是56MB
www@iZ2zefuufnen6rfx7c81u7Z:~/.npm$ npm cache verify
Cache verified and compressed (~/.npm/_cacache):
Content verified: 1164 (39196729 bytes)
Index entries: 1167
Finished in 1.321s
====更新
在我的项目的另一个测试。运行rm -rf node_modules && npm clean cache --force
后,再run npm install
在171.389s增加1551包。然后rm -rf node_modules && npm install
在152.378s增加1551包。难道真的NPM使用缓存?
全球包缓存默认情况下使用。你应该注意到在你安装时刻的差,如果你第一次做一个“故宫缓存清理”。这将清理什么不是全局安装,对于那些你必须明确地做一个“故宫卸载”