检查禁用DNS缓存的安卓 [英] check disabling of dns caching in Android

查看:386
本文介绍了检查禁用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.

推荐答案

的Andr​​oid不支持这种方式,改变DNS缓存时,Android 4.0的,无法更改DNS TTL

Android not support that way, change dns cache when android 4.0, can't change dns ttl

是回答

这篇关于检查禁用DNS缓存的安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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