是否可以完全关闭ivy的缓存? [英] Is it possible to turn off ivy's cache altogether?

查看:27
本文介绍了是否可以完全关闭ivy的缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我说的是 ivy 2,而不是更新的版本.

I'm talking about ivy 2, not some newer version.

推荐答案

关闭缓存会影响性能.关闭它会失去依赖项管理的一大好处,因为您会强制每个构建下载所有内容......

Switching off the cache affects performance. Switching it off loses one of the big benefits of dependency management, because you'd force each build to download everything....

话虽如此,随着时间的推移,缓存有时会变得陈旧,尤其是在远程模块可能具有不断变化的依赖关系的情况下(可能发生在开发过程中).为了解决这个问题,我总是包含一个额外的构建目标来清除我的常春藤缓存:

Having said that, over time the cache sometimes become stale, especially in situations where the remote modules might have changing dependencies (Can occur during development). To counter this problem I always include an extra build target that purges my ivy cache:

<target name="clean-all" depends="clean">
    <ivy:cleancache />
</target>

这为您提供了两全其美的体验.禁用缓存是通过首先运行清除来完成的,如下所示:

This gives you the best of both worlds. Disabling the cache is accomplished by first running a purge as follows:

ant clean-all build

这篇关于是否可以完全关闭ivy的缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆