Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我org.apache.http.client.methods.HttpGet用来从服务器读取纯文本文件。服务器没有发送任何类型的“过期”标头。我发现对 HttpGet 的重复调用正在返回文本文件的过时版本,显然来自某种缓存。
org.apache.http.client.methods.HttpGet
有没有办法强制 GET 去服务器而不是缓存?
试试这个
addHeader("Cache-Control", "no-cache");