Home All Groups Group Topic Archive Search About

HttpRequestCachePolicy & WinINet in .NET 2.0 Framework

Author
27 Sep 2006 11:07 AM
Roger Down
I have been using the WinINet caching feature in some of my .NET 1.1
applications. This was achieved by wrapping some of the methods in the
WinINet library.

When .NET 2.0 was released I read that it would include http web client
caching functionality, and I hoped it would make my own wrappers obsolete.

I read an article in Karen Corby's blog that System.Net.HttpWebRequest's
cache uses the IE cache, which is the same cache as the WinINet library
uses.
(http://scorbs.com/2006/06/21/caching-xbaps/)

This was good news and I runned the code found on Karen's blog to verify
this functionality.

The variable requestURI was set to http://myserver.com/test.html and I found
the cached data in TIF\Content.IE5\DGDYW6LC\test[1].cache.

1. For some (to me unknown) reason the test.html file has been renamed to
test.cache, can anyone explain why this is done ?

2. So the data is now in the IE cache, how can I get the file name stored in
the cache based on uri ? E.g. say I have a function
GetCacheFilePathBasedOnUri(http://myserver.com/test.html) and this will
return the filepath to the file in IE cache.

3. Since WinINet functionality seems to have been implemented into .NET 2.0,
why can't these objects be exposed to public so developers can make use of
it and customize its usage ?


Best of regards...

AddThis Social Bookmark Button