如何在webservice中设置强大的缓存

时间:2017-11-24 14:33:43

标签: android web-services caching https

我的网络服务:

        HttpClient client = new DefaultHttpClient();
        HttpPost method = new HttpPost(url);
        if (params != null) {
            method.setEntity(new UrlEncodedFormEntity(params, "UTF-8"));
        }
        HttpResponse response = client.execute(method);
        InputStream inputStream = response.getEntity().getContent();
        String result = convertInputStreamToString(inputStream);

如何设置此代码的缓存, 在没有互联网的情况下回复缓存

0 个答案:

没有答案