检查在Android中禁用dns缓存 [英] check disabling of dns caching in Android
本文介绍了检查在Android中禁用dns缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的同事在Android应用程序中禁用了dns缓存。但是我们必须检查我们是否真的禁用缓存。你有什么想法吗?
My colleague have disabled dns caching in Android application. But we have to check whether we really disabled caching. Do you have any ideas how to check it?
我们使用下面的命令来禁用它:
We used the next commands to disable it:
System.setProperty("networkaddress.cache.ttl", "0");
Security.setProperty("networkaddress.cache.ttl", "0");
ps:自动化测试需要此禁用。
ps: this disabling is needed for automation tests.
推荐答案
Android不支持这种方式,当android 4.0更改dns缓存时,无法更改dns ttl
Android not support that way, change dns cache when android 4.0, can't change dns ttl
这篇关于检查在Android中禁用dns缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文