volley设置缓存过时后从新请求缓存

volley的使用这里我就不说了,只须要在初始化StringRequest以前执行如下代码便可web if (queue.getCache().get(url) != null) { Cache.Entry entry = queue.getCache().get(url); entry.softTtl = entry.serverDate + 1800000; //这里使用了缓存
相关文章
相关标签/搜索