3

When I use the following command

mix deps.update --all

mix will use locally cached packages if the version of a package has not been changed in the mix.ex file. So the question is, how can I force mix not to use the cached version and download it from the server instead? For example, if there were changes in the last version of some package and I want to pick those up, even if the version has not been bumped.

4

1 回答 1

6

第一个发布的 Hex 包在最初创建后最多只能更改 1 小时,之后它变得不可变并且永远不会更改。将来,当 Hex 在发布之前添加用于测试包的工具时,您将永远无法更改已发布的包。

Hex 执行条件 GET 请求以获取已缓存的包。如果包没有改变,我们使用缓存,如果它确实改变了,我们再次获取它。如果您无法访问 Hex CDN,它将自动使用缓存的包(如果可用)。

此外,每当您获取或更新软件包时,Hex 将下载所有已发布软件包的注册表,其中包括我们用来验证软件包 tarball 的校验和,因此您将永远无法使用过时的软件包。

于 2015-10-10T04:25:53.560 回答