问题描述
我有一个具有以下WebClient的函数
I have a function that has the following WebClient
WebClient wc = new WebClient(); wc.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1"); wc.Headers.Add("Accept", "application/atom+xml;Version=1"); // still causing error RequestCachePolicy policy = new RequestCachePolicy( RequestCacheLevel.NoCacheNoStore); wc.CachePolicy = policy;
jsonString = wc.DownloadString(" https://api.weather.gov/alerts/active ?event =特殊海事警告
jsonString = wc.DownloadString("https://api.weather.gov/alerts/active?event=Special Marine Warning
即使这个字段是空的,它也会以某种方式在我的函数中拉出一个缓存版本。它来自何处以及如何阻止它这样做?
$
Even though this field is empty it is somehow pulling a cached version in my function. Where is this coming from and how do I stop it from doing that?
推荐答案
这篇关于缓存未清除...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!