Silverlight - Caching On REST-based Services
I have a Silverlight application that is interacting with a WCF service. This service uses a RESt-based format. In my application, I am hitting this service with a WebRequest object开发者_运维技巧. I'm making my call as follows:
WebRequest request = HttpWebRequest.Create(serviceUrl);
request.BeginGetResponse(new AsyncCallback(Operation_Completed), request);
I've noticed that subsequent calls are being called. This is NOT what I want. I do not want anything cached. How do I do that?
Have a look at the CachePolicy.Level property. It gives you fine-grained control over caching behavior.
精彩评论