开发者

Silverlight - Caching On REST-based Services

开发者 https://www.devze.com 2023-02-11 18:00 出处:网络
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\

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消