0

What is the way of HttpWebRequest cache works?

I tried recycling the app pool on IIS in which my web application is hosted but I was still getting cached responses.

So cache entries are not stored in memory? How exactly it works?

4

1 回答 1

1

缓存存储在磁盘上。

HttpWebRequest使用WinINet缓存,这是 Internet Explorer 的底层缓存机制。文件存储在 Temporary Internet Files 文件夹中,该文件夹与 IE 存储临时内容的位置相同。因此,如果您删除临时 Internet 文件,缓存将被清除。

来自StackOverflow 的另一个答案

HttpWebRequest 使用 System.Net.Cache.RequestCache 进行缓存。这是一个抽象类;Microsoft CLR 中的实际实现是 Microsoft.Win32.WinInetCache,顾名思义,它使用 WinInet 函数进行缓存。

另一个好文章在这里

于 2016-05-14T05:42:14.347 回答