“分辨率”缓存与“存储库”缓存与“常春藤”缓存
常春藤缓存基本上是一个文件夹,常春藤存储工件和配置。如果不是configured differently,可以在 UserHome/.ivy2 中找到
常春藤缓存由分辨率缓存和存储库缓存组成。
存储库缓存包含由 ivy 下载的存储库中的工件。它正在缓存存储库,因此常春藤每次尝试解析/下载工件时都不需要查询存储库。如果它在存储库缓存中找到合适的工件,它将不会查询存储库。从而节省了查询存储库的成本。是否以及如何使用缓存有点复杂,取决于依赖项/配置。
解析缓存是 ivy 特定文件的集合,它告诉 ivy 工件是如何被解析(下载)的。
“Ivy 存储库”,而不是我的普通 SCM,它是一个运行 SVN 的服务器
常春藤世界中的存储库是一个位置,其中包含工件(jar)文件。这可以是本地文件系统或 Web 服务器。它没有版本控制系统。工件的每个版本都包含在一个单独的文件夹中。您不能提交工件,只需将它们添加到文件系统中。见terminology
org\artifact\version1\artifact.jar
org\artifact\version2\artifact.jar
通过resolver 访问存储库,它必须知道存储库的布局。
来自缓存上的doc:
Cache types
An Ivy cache is composed of two different parts:
the repository cache
The repository cache is where Ivy stores data downloaded from module repositories, along with some meta information concerning these artifacts, like their original location.
This part of the cache can be shared if you use a well suited lock strategy.
the resolution cache
This part of the cache is used to store resolution data, which is used by Ivy to reuse the results of a resolve process.
This part of the cache is overwritten each time a new resolve is performed, and should never be used by multiple processes at the same time.
While there is always only one resolution cache, you can define multiple repository caches, each resolver being able to use a separate cache.