开发者

What is RequestCacheLevel.BypassCache internally?

The documentation on RequestCacheLevel.BypassCache doesn't explain much on the internal working of setting this with HttpWebRequest. Some questions I have on it:

  • What cache is this refering to?
    • A previous comment which implies it shares with Internet Explorer?
  • Is this setting adding any cache control headers?
  • How does this compare with NoCacheNoStore & Reload which do set headers?
  • If I want to ensure (as much as possible from the client side) that the content does not开发者_JAVA技巧 come from cache is this the best option?


To answer my own question:

  • HttpWebRequest does make use of the IE cache and RequestCacheLevel.BypassCache is refering to that cache.
  • The setting is adding cache control headers
  • Compared to NoCacheNoStore both avoid the cache; however, BypassCache will load to the cache so if you do a future request it will be there. Reload does similar but the headers allow proxies to return from their cache whereas BypassCache tells proxies to ignore their cache too.
  • Yes, it is the best option ;)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜