views:

92

answers:

1

I am using a HttpWebRequest created from WebRequestCreator.ClientHttp.Create() to fetch data from a webservice. And everything seemed to be working fine until I found out the calls where being cached. I was pretty sure that the ClientHttp did not include caching, but after a bit of searching I found this little note:

Client HTTP Processing

  • Caching support

http://msdn.microsoft.com/en-us/library/dd772166(VS.95).aspx#networking

Which is the what's New in Silverlight 4 page on MSDN. But that is almost the only information I can find. I found another post claiming that the ClientHttp will request respect no-cache headers from the server, but I really would prefer that my Silverlight application was not dependent on a server-side setting.

The usual fix to this problem is to simply add a random parameter to each call, but I really would like a more elegant solution.

Is there a way to simple disable the cache on ClientHttpWebRequest? - Preferable on single call and not a global setting.

A: 

The documentation you link seems to say that caching is not enabled in ClientHttp. However I'm also seeing behavior that looks suspiciously like GET response caching. I don't see a way to disable it either.

Jay
I can't see where it says caching is not enabled in ClientHttp, it says caching is a new feature added in Silverlight 4. If you where finding it on other pages on MSDN, it's proberly an outdated page for Silverlight 3, where there where no caching for ClientHttp.Anyway it seems weird that they add this and not have a way of controlling it.
Lillemanden
http://msdn.microsoft.com/en-us/library/dd920295(v=VS.95).aspxThis article says Not Enabled
Jay