yarn-cli 缓存

yarn cache list

Yarn 会在你的用户目录下开辟一块全局缓存用以保存下载的包。yarn cache list 用于列出所有已经缓存的包。

yarn cache dir

执行 yarn cache dir 命令会打印出当前的 yarn 全局缓存在哪里。

yarn cache clean

执行此命令将清除本地缓存。下次执行 yarn 或 yarn install 时将会重新填充缓存。

改变 yarn 的缓存路径

设置 cache-folder 的值用来改变缓存目录:

yarn config set cache-folder <path>

 

你还可以利用 --cache-folder 参数来指定缓存目录:

yarn <command> --cache-folder <path>

 

posted @ 2018-02-01 21:18  Sunsin  阅读(5151)  评论(0编辑  收藏  举报