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.